我的复制停留在某些Last_SQL_Error
和Slave_SQL_Running: No
现在我要执行:
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
但是我不能:
mysql> STOP SLAVE;
ERROR 1045 (28000): Access denied for user 'someuser'@'%' (using password: YES)
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation.
该用户是通过Google Cloud Platform创建的-> SQL->选择只读副本实例->用户->创建用户帐户。
那里说:Users created by using the Cloud Console have the same privileges as the root user.
但是它仍然没有SUPER特权(比我在FAQ中看到的特权]
Cloud SQL does not support SUPER privileges, which means that GRANT ALL PRIVILEGES statements will not work. As an alternative, you can use GRANT ALL ON `%`.*.
但不起作用:
mysql> GRANT ALL ON `%`.* TO 'someuser'@'%' WITH GRANT OPTION;
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
所以如何使复制再次起作用?
由于没有SUPER privilege for the root user on GCP SQL,因此您不能使用stop slave命令。您始终可以通过使用GCP UI上的“ DISABLE REPLICATION”来停止复制。
如果复制在过程中停止(或卡住),则在issue tracker上打开一个问题,我们也许可以从我们的角度进行研究。