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



Related Posts:

Filed Under: MySQL

Leave a Comment

(required)
(will not be published, required)

* Copy this password:

* Type or paste password here:






Archives

Links