You will start by logging into your server via ssh and logging into your MySQL entering the following:
mysql –uadmin –p`cat /etc/psa/.psa.shadow`
Grant Privilege
GRANT SELECT ON database.* TO username@'localhost' IDENTIFIED BY 'password';
To enable more options you would separate them with a comma. So to enable SELECT, INSERT, and DELETE your syntax would look like this;
GRANT SELECT, INSERT, DELETE ON database.* TO username@'localhost' IDENTIFIED BY 'password';
Once you have given the desired privileges for your user, you will need to run this command within the MySQL command prompt;
FLUSH PRIVILEGES;
To see a list of the privileges that have been granted to a specific user;
select * from mysql.user where User='user' \G
No comments:
Post a Comment