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
- Complete Steps to Add a Website
- Protect Directory
- MySQL Log File
- MySQL Backup and my.cnf
- Monitor MySQL Log File
- MySQL Start Script
- How to Transfer a Website Effectively
Filed Under: MySQL