How to disable Read-Only in SQL replica?

226 views
Skip to first unread message

Ann Su

unread,
Dec 28, 2016, 9:22:17 AM12/28/16
to Google Cloud SQL discuss
Google Console interface allows to set up "read-only" flag to OFF for a read replica. However, regardless of the flag's value, which according to: 

$ gcloud sql instances describe {{replica}}


is correctly set:


[...]

  - name: read_only

    value: 'off'


the global variable in mysql is still set to ON:

mysql> show variables like "read_only";

+---------------+-------+

| Variable_name | Value |

+---------------+-------+

| read_only     | ON    |

+---------------+-------+


Is this a bug? 

I'm aware of all related risks of writing to a replica and am willing to do that anyway. If I can't disable read_only mode for built-in replicas, what are my options? Can I manually configure replication using SQL instances in a way that such replica wouldn't get into read_only mode?

paynen

unread,
Dec 28, 2016, 11:49:58 PM12/28/16
to Google Cloud SQL discuss
Hey Ann Su,

I'll be checking whether this is reproducible on my own instances. The documentation implies this is alterable, so it shouldn't be happening in my view. I'll update you with my findings within the next two days.

Cheers,

Nick
Cloud Platform Community Support

paynen

unread,
Dec 30, 2016, 4:14:50 PM12/30/16
to Google Cloud SQL discuss
Hey Ann Su,

I've replicated this and will be making sure it's seen by the relevant Cloud SQL specialists. I'll return to this thread to post a Public Issue Tracker link where you can follow the progress on this issue.


Cheers,

Nick
Cloud Platform Community Support 

On Wednesday, December 28, 2016 at 9:22:17 AM UTC-5, Ann Su wrote:

Ann Su

unread,
Dec 30, 2016, 8:48:39 PM12/30/16
to Google Cloud SQL discuss
Hi Nick,

many thanks for a quick turnaround! 

Ann

Ann Su

unread,
Jan 7, 2017, 5:45:21 AM1/7/17
to Google Cloud SQL discuss
Nick, any updates on this? 

Ann

paynen

unread,
Jan 9, 2017, 10:46:32 AM1/9/17
to Google Cloud SQL discuss
Hey Ann,

Thanks for your patience. As it turns out, altering this flag on replicas is not possible, and it's been an oversight to have left this flag alterable in the interface / API. We'll have this corrected. Since it appears you'd like to have this flag be alterable on the replica instances, you can file a Feature Request in the Public Issue Tracker for Cloud SQL detailing the feature you'd like to see, why you'd need to use it, etc. and we'll quickly get it logged and considered going forward.


Cheers,

Nick
Cloud Platform Community Support

Ann Su

unread,
Jan 9, 2017, 2:27:36 PM1/9/17
to Google Cloud SQL discuss
Hi Nick,

I've just filed a feature request.  

Is there a way to set up a custom slave using bingo from SQL master instance?

thanks,
Ann

paynen

unread,
Jan 9, 2017, 5:00:36 PM1/9/17
to Google Cloud SQL discuss
Hey Ann,

It seems Bingo is an SQL server software? In that case you should run it on a Compute Engine instance. You could also run the replicas on Compute Engine instances. Read more in the documentation about Cloud SQL -external replicas and masters and let me know if you have any more questions.


Cheers,

Nick
Cloud Platform Community Support

Ann Su

unread,
Jan 10, 2017, 6:03:11 AM1/10/17
to Google Cloud SQL discuss
Ah, I'm sorry, apparently my browser autocorrected "binlog" to "bingo". Running replicas on Compute Engine could do the trick, thanks.

Ann,

paynen

unread,
Jan 10, 2017, 10:49:33 AM1/10/17
to Google Cloud SQL discuss
Ah, I understand. Feel free to message back to this thread if you have any questions in setting up the external replicas. 


Cheers,

Nick
Cloud Platform Community Support

Reply all
Reply to author
Forward
0 new messages