databacker/mysql-backup

mysqldump: Error: 'Access denied

ploitivel opened this issue · 1 comments

I am getting the following error : mysql:8.0.

docker logs backup

  • mysqldump -h db -P 3306 -uroot -psecret@_sql -A
    mysqldump: Error: 'Access denied; you need (at least one of) PROCESS privileges for this operation' when trying to dump tablespaces

About the access mysqldump denied PROCESS privilege error
mysqldump accesses tablespace information in the FILES table. Prior to MySQL 5.7.31 and 8.0.21, your user could run mysqldump without the PROCESS privilege. However, users running mysqldump after the update need PROCESS privileges to access the INFORMATION_SCHEMA.FILES table. Running mysqldump without PROCESS privilege ends up giving you an Access denied error.

What could I do in these cases?
From what I see the container is only for using mysql 5.7

The issue appears to be privileges for the user you are using for DB_USER. You need to add the PROCESS privilege to whatever user you are using.

You can test it by running it manually:

mysqldump -h <server> -P <port> <user> <pass> -A

(or just pick one database)