Mysqldump: Couldn't execute 'show events': Access denied for user 'root'@'localhost' to database 'xyz' (1044)

CentOS 7.9
MariaDB mysql Ver 15.1 Distrib 5.5.68-MariaDB

First of all I want to emphasize this is an old server.
Secondly the majority of sites are giving this error. I can’t backup those sites’ MySQL.
Thirdly I’ve googled this to death.

In the past, I would simply upgrade MariaDB. But this is a high risk server with 100s of sites and so many databases. It’s really complicated to upgrade MariaDB and risky.

Any guidance?


Wow this is crazy. On the command line, I did this:

mysql -uroot -psecret

Then on the console:

show grants for ‘root’@‘localhost’

From that stack I deduced that the grant never had a “grant all”

So lurking in the comments it said:

Try ‘root’@‘’

So I tried

mysql -uroot -panother_secret -h127.0.0.1

The ‘another_secret’ was actually in clear text in the show grants command.

Then did:

grant event on . to ‘root’@‘localhost’;
Query OK, 0 rows affected (0.00 sec)

Before it would give an error, but not anymore on

Thank goodness, it’s working now.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.