MySQLトラブルシューティング - mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)

概要

以下のように mysqldump コマンド実行時に掲題のエラーが発生しました。

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)

対策

エラー文の通り、RELOAD権限を付与する。

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

以上

MySQLトラブルシューティング - 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/2016/01/18/2016-01-19-mysqldump-couldnt-execute-flush-tables-access-denied/

Author

Kenzo Tanaka

Posted on

2016-01-19

Updated on

2020-05-07

Licensed under

コメント