我运行以下命令来创建一个mysqldump
mysqldump -ubackup -psomething --single-transaction --quick somedatabase | gzip > 4_19.gz
在创建转储的 60%(估计检查 zip 文件的大小)后出现以下错误:
mysqldump: Couldn't execute 'show table status like 'customer\_cohort\_paid'': SELECT command denied to user ''@'%' for column 'customer_id' in table 'sales_order' (1143)
它谈到了空白用户的权限问题user ''@'%'
。此外,grants
对于backup
用户如下:
mysql> show grants for 'backup'@'%';
+------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for backup@% |
+------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, LOCK TABLES, SHOW VIEW, EVENT, TRIGGER ON *.* TO 'backup'@'%' IDENTIFIED BY PASSWORD '*SOMETHING' |
+------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
我究竟做错了什么?