Applicable to:
- Plesk for Linux
Symptoms
Unable to add an external MySQL database server in Plesk:
PLESK_ERROR: Error: SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'pleskadmin'@'192.0.2.2' to database 'example_db'
Cause
Not enough permissions for root user on remote database server.
MYSQL_LIN: select User,Grant_priv from user where User='root' and Host='192.0.2.2'\G;
*************************** 1. row ***************************
User: root
Grant_priv: N
Resolution
-
Connect to MySQL as root/super user on the remote database server
-
Grant permissions to the user used in Plesk:
For MySQL:
MYSQL_LIN: update user set Grant_priv = 'Y' where Host = '192.0.2.2' and User = 'pleskadmin';
For MariaDB:
MYSQL_LIN: GRANT ALL PRIVILEGES ON *.* TO `pleskadmin`@`192.0.2.2` WITH GRANT OPTION;
-
Flush the privileges:
MYSQL_LIN: flush privileges;
- Add external database server to Plesk
Comments
0 comments
Please sign in to leave a comment.