Sunday, April 4, 2010

How to create a user account in mysql

Answer

We can create an user account using the GRANT statement

Example:

$>mysql -u root -p
mysql> GRANT ALL ON mysqlquestions.* TO 'newusername'@'localhost' IDENTIFIED BY 'yourpassword'

Now you have created a user named "newusername" and given all access followed by the password "yourpassword"

No comments:

Post a Comment