FreeBSD Server Administration

« Mod_rewrite | Main | Complete Steps to Add a Website »

January 13, 2005

Create MySQL User

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


Category : MySQL

Posted by FreeBSD Newbie at January 13, 2005 08:02 AM

Comments

Post a comment



(Optional, will not be shown to the public)

Remember Me?