Grant Privileges in Mysql

Grant Privileges in Mysql

Plesk does not allow GRANT privileges to users via the Control Panel: This tutorial shows how to do it from the command line. more >>

Contents

open command line

Open the command line terminal.

Login as root user

Login as root user.

Open (Plesk's) Mysql Command line

Enter

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Grant Privileges

Grant the privileges for a user:

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

to allow the SELECT statement only.

Enter
GRANT ALL ON database.* TO username@'localhost' IDENTIFIED BY 'password';

to grant all privileges.