• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Error with Mysql Flush

P

PierrickL

Guest
Hello i need your help to flush my mysql database.
I've got a cron request which is :

mysql --user=LOGIN --password=PASSWORD --e 'RESET QUERY CACHE'

And i've got this result :
ERROR 1227 (42000) at line 1: Access denied; you need the RELOAD privilege for this operation

What should i do in Plesk to get the RELOAD privilege, or should i do something else ?

Thanks for your help.

P.
 
Check in 'mysql' database that this user has enabled RELOAD privilege with something like:

mysql> select User, Reload_priv from user where User='username';

And enable it if necessary.
 
Thanks for this answer, but i don't understand where i can execute this command ?

The point i don't really understand is that i am the admin of my owne dedicated server.
On this server, i set up Plesk 10.0 for Linux.
On Plesk, i set up domains.
For each domain i created mysql database.
For each database, i created 1 user.

Is there a general Mysql server which i can access to set up the reload privilege ? (one for all the domains ?)
Or should i set up the reload privilege for each user of each database ?

Thanks for these answers.

Regards.

P.
 
It is 'mysql' database. You should use it for mentioned SQL queries. Contact Support Team if you are not familiar with SQL.
 
Thanks.
On Plesk i've got serveral domains, with several Database.

And i can't connect to mysql with a Root user, can I ?

The only thing i can do is to connect with the user of the database of each domain.
With this type of connexion, i can't access to the USER table to change the reload privilege.

Thanks for your help.
 
Thanks for this.
I can connect to mysql with the Admin user and the password of Plesk.
But now when i write this command :
mysql> select User, Reload_priv from user where User='THE USERNAME';
I've got this message :
ERROR 1046 (3D000): No database selected

I try to connect to User Database but it seems this database doesn't exist.
What is the name of the User database ?

Thanks for your help.
 
Back
Top