Granting Privileges in MySQL

The following command used in the mysql command prompt will create a new user with a password and give them privileges on a particular database.


GRANT SELECT ON database.* TO user@'localhost' IDENTIFIED BY 'password';

Leave a Reply

Your email address will not be published. Required fields are marked *