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:
- Commonly Used Configuration Files and Commands
- MySQL Log File
- Monitor MySQL Log File
- MySQL Backup and my.cnf
- MySQL Start Script
- Optimizing MySQL
- Using Perl and MySQL
- MySQL Optimization
Filed Under: MySQL