简体   繁体   English

从外部Mysql主机复制Google Cloud实例

[英]Replicating a Google Cloud Instance from an External Mysql Master

This documentation is out of date with the new Google Cloud Platform Software: https://cloud.google.com/sql/docs/replication#external-master-replica 该文档与新的Google Cloud Platform软件已经过时: https//cloud.google.com/sql/docs/replication#external-master-replica

We're using a Second Generation Cloud (BETA) database instance and it needs replicate FROM an external Master to make sure all of the data is in sync and live migration is correct. 我们使用的是第二代云(BETA)数据库实例,它需要从外部主数据库进行复制,以确保所有数据同步并且实时迁移正确。

When I am using the CHANGE MASTER TO; 当我使用CHANGE MASTER TO时; I am receiving a permissions denied error, and I am sure that I have the correct permissions. 我收到一个权限被拒绝的错误,并且我确定我具有正确的权限。

We performed the same steps on a secondary smaller instance with the same result. 我们在较小的辅助实例上执行了相同的步骤,并获得了相同的结果。

Any thoughts? 有什么想法吗?

          Select_priv: Y
           Insert_priv: Y
           Update_priv: Y
           Delete_priv: Y
           Create_priv: Y
             Drop_priv: Y
           Reload_priv: Y
         Shutdown_priv: Y
          Process_priv: Y
             File_priv: Y
            Grant_priv: Y
       References_priv: Y
            Index_priv: Y
            Alter_priv: Y
          Show_db_priv: Y
            Super_priv: Y
 Create_tmp_table_priv: Y
      Lock_tables_priv: Y
          Execute_priv: Y
       Repl_slave_priv: Y
      Repl_client_priv: Y
      Create_view_priv: Y
        Show_view_priv: Y
   Create_routine_priv: Y
    Alter_routine_priv: Y
      Create_user_priv: Y
            Event_priv: Y
          Trigger_priv: Y
Create_tablespace_priv: Y

But yet I can't change Master items: 但是我不能更改主项目:

mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107, MASTER_HOST='', MASTER_USER='', MASTER_PASSWORD=''; mysql>将MASTER更改为MASTER_LOG_FILE ='mysql-bin.000001',MASTER_LOG_POS = 107,MASTER_HOST ='',MASTER_USER ='',MASTER_PASSWORD =''; ERROR 1227 (42000): Access denied; 错误1227(42000):访问被拒绝; you need (at least one of) the SUPER privilege(s) for this operation 您需要(至少其中一种)SUPER权限才能执行此操作

Sorry about the documentation, the feature is not available in the UI but you should be able to set it up via the API. 抱歉文档,该功能在UI中不可用,但是您应该可以通过API进行设置。

Click the "Cloud SQL API" tab in the documentation for the API instructions. 单击文档中的“ Cloud SQL API”标签以获取API说明。

Easiest way to do it would be to look at the parameters in the documentation and use the API explorer to execute the requests. 最简单的方法是查看文档中的参数,然后使用API​​资源管理器执行请求。

From the documentation: 从文档中:

1) managed Cloud SQL instances do not support commands requiring super privileges. 1)托管Cloud SQL实例不支持需要超级特权的命令。

2) 2nd generation instances do not support replication from an external master 2)第二代实例不支持从外部主服务器复制

The only way to do what you want would be to create a first generation instance for this purpose, and use this tutorial in order to set up the replication. 为此,唯一的方法是为此目的创建第一代实例,并使用本教程来设置复制。 What it does is creating a silent internal master which then replicates to the slave instance (1st gen). 它要做的是创建一个无声的内部主服务器,然后将其复制到从属实例(第一代)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 MySQL 复制到 Google Cloud SQL 时的 GCP_USERNAME 是什么 - What is the GCP_USERNAME when replicating from MySQL to Google Cloud SQL Google Cloud MySQL 和 Master-master 复制 - Google Cloud MySQL and Master-master replication MySQL 复制:防止主服务器复制表插入 - MySQL Replication: Preventing master server from replicating table inserts 如何从外部PHPMyAdmin安装连接到Google Cloud SQL实例? - How to connect to a Google cloud SQL instance from an external PHPMyAdmin installation? 从外部服务器转储 Cloud SQL MySQL 实例 - Dump a Cloud SQL MySQL instance from an external server 从本地运行的 NodeJS / TypeORM 连接到 Google Cloud MySQL 实例 - Connect to Google Cloud MySQL instance from local running NodeJS / TypeORM 两个复制主mysql服务器之间的事务 - Transactions between two replicating master mysql servers 无法删除谷歌云 sql 复制主实例 - Can't delete google cloud sql replication master instance 从本地MySQL主数据库到Google Cloud SQL从数据库的逐步复制数据 - step-by-step replication data from local MySQL master to Google Cloud SQL slave Google Cloud - 无法使用内部 IP 从 GKE 连接到 MySQL 云 sql 实例 - Google Cloud - Cant connect to MySQL cloud sql instance from GKE using internal IP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM