Wednesday, May 19, 2010

Creating Mysql User Accounts

shell> mysql -u root [-p]
shell> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'some_pass';
shell> GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;
shell> CREATE USER 'user_name'@'%' IDENTIFIED BY 'some_pass';
shell> GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'%' WITH GRANT OPTION;

No comments:

Post a Comment