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 | $ mysqldump --lock-all-tables --events -h <host_name> -u <user> -p<password> --no-create-info <db_name> <table, ...> > output.sql |
Solution
As the error message indicates, grant the RELOAD privilege.
1 | mysql> GRANT RELOAD ON *.* TO '<user>'@'<host_name>'; |
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/