Home > MySQL > Create MySQL User

Create MySQL User

January 13, 2005 Posted by KP

Using grant to create new mysql user, the following two commands will create a new user named “user_name” with password “somepassword”, the new user has all the permission on database “database_name”.

mysql> grant usage on database_name.* to user_name@localhost IDENTIFIED BY ’somepassword’ WITH GRANT OPTION;

mysql> grant all on database_name.* to user_name@localhost;

Test the new account
# mysql -u user_name -p

Bookmark and Share


Related Posts:

Filed Under: MySQL

Leave a Comment









*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Categories

Archives

Links

  • Dedicated Servers
  • Meta