Separate user for each webapp's MySQL database

The following commands will create a separate user for each MySQL database.

> GRANT ALL PRIVILEGES ON PureExample.* TO 'pureuser'@'localhost' 
IDENTIFIED BY 'purepassword' WITH GRANT OPTION;
> FLUSH PRIVILEGES;


This is good practice when writing web applications, so that each web application has its own database user.

Comments

Popular posts from this blog

Arrays in Visual Basic and classic ASP

JavaScript: Checking for undeclared and undefined variables

A fix for LaTeX "Missing $ inserted." console message