■ Make a db name before the following commands
mysql> GRANT ALL PRIVILEGES ON db_name.* TO user_name@localhost IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON db_name.* TO user_name@'127.0.%' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
■ Make a new Mysql user
■ The % means the user 'selectUser' connecting from any host.
mysql>CREATE USER 'selectUser'@'%' IDENTIFIED BY 'password';
mysql>GRANT SELECT ON databaseName.* TO 'selectUser'@'%';
■ Make a new Mysql user
mysql>DROP USER 'sample'@'192.168.%';
■ Reference URL
http://www.alphadevx.com/a/388-Adding-a-read-only-MySQL-user
No comments:
Post a Comment