Catalogue
MySQL Troubleshooting - mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)

MySQL Troubleshooting - mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)

🌐 日本語で読む

Overview

When running the mysqldump command as shown below, I hit the error mentioned in the title.

1
2
3
$ mysqldump --lock-all-tables --events -h <host_name> -u <user> -p<password> --no-create-info <db_name> <table, ...> > output.sql

mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)

Solution

As the error message indicates, grant the RELOAD privilege.

1
2
mysql> GRANT RELOAD ON *.* TO '<user>'@'<host_name>';
mysql> FLUSH PRIVILEGES;

That’s all.

MySQL Troubleshooting - mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)

https://kenzo0107.github.io/en/2016/01/19/mysqldump-couldnt-execute-flush-tables-access-denied/

Author

Kenzo Tanaka

Posted on

2016-01-19

Licensed under