我正在尝试设置 MySQL 复制从属设备,并且运行起来非常困难LOAD DATA FROM MASTER;
。是的,我知道它已被弃用,但我正在运行 MySQL 5.1,目前这不是我的问题。
出于某种原因,MySQL 一直告诉我该CREATE
命令被拒绝,但检查 SHOW GRANTS 却说不然。看一下这个:
mysql> SHOW GRANTS;
+--------------------------------------------------------------------------------------------------------------------+
| Grants for replicator@% |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'replicator'@'%' IDENTIFIED BY PASSWORD '*ABCDEFABCDEFABCDEFABCDEFBLAHBLAHBLAHBLAH' |
+--------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> LOAD DATA FROM MASTER;
ERROR 1142 (42000): CREATE command denied to user 'replicator'@'localhost' for table 'aggregate'
mysql>
我觉得奇怪的是,当打电话时LOAD DATA FROM MASTER
,它认为我是'replicator'@'localhost'
,但SHOW GRANTS
说'replicator'@'%'
。为了安全起见,我也给了相同的权限'replicator'@'localhost'
。
mysql> SHOW GRANTS FOR 'replicator'@'localhost';
+----------------------------------------------------------------------------------------------------------------------------+
| Grants for replicator@localhost |
+----------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'replicator'@'localhost' IDENTIFIED BY PASSWORD '*ABCDEFABCDEFABCDEFABCDEFBLAHBLAHBLAHBLAH' |
+----------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
那么,关于为什么这一切都搞砸了有什么想法吗?是的,我也做过FLUSH PRIVILEGES
很多次。
提前感谢您提供的任何建议。