On mysql prompt typemysql>grant select on dbn.tbn to 'username@localhost' identified by 'password';
This will give
select permission on tablename
tbn in database name
dbn with username
'username@localhost' , where localhost is the current host, identified by password
'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';
A simple example can be:
grant all on databasename.* to john identified by 'john123';
Once you have given the desired privileges for your user, you will need to run this command within the MySQL command prompt;
To see a list of the privileges that have been granted to a specific user;
select * from mysql.user where User='user' \G
