CloudSQL只读副本-无法执行停止从属,跳过命令

问题描述 投票:0回答:1

我的复制停留在某些Last_SQL_ErrorSlave_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

所以如何使复制再次起作用?

mysql google-cloud-sql
1个回答
0
投票

由于没有SUPER privilege for the root user on GCP SQL,因此您不能使用stop slave命令。您始终可以通过使用GCP UI上的“ DISABLE REPLICATION”来停止复制。

如果复制在过程中停止(或卡住),则在issue tracker上打开一个问题,我们也许可以从我们的角度进行研究。

© www.soinside.com 2019 - 2024. All rights reserved.