0
votes

This documentation is out of date with the new Google Cloud Platform Software: 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.

When I am using the 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=''; ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

2

2 Answers

0
votes

Sorry about the documentation, the feature is not available in the UI but you should be able to set it up via the API.

Click the "Cloud SQL API" tab in the documentation for the API instructions.

Easiest way to do it would be to look at the parameters in the documentation and use the API explorer to execute the requests.

0
votes

From the documentation:

1) managed Cloud SQL instances do not support commands requiring super privileges.

2) 2nd generation instances do not support replication from an external master

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).