0

I am trying to create a MySQL replica in Cloud SQL, Google's managed MySQL service. However I have the following error which won't allow me to start replication:

 "kind": "sql#externalSyncSettingErrorList",
  "errors": [
    {
      "kind": "sql#externalSyncSettingError",
      "type": "UNSUPPORTED_DEFINER",
      "detail": "Definer user root@localhost not supported. Please update host to '%'."
    }
  ]

The docs suggest this as the solution:

Update the definer in the external databases, for example from root@localhost to root@%

I am quite new to MySQL and I don't know how to make this change. I have done some research and it seems definers are related to some action like view, event, or routine so I suppose the question becomes which actions do I need to update the definer for to enable replication?

I found the following snippet which I guess is something like what I will need:

  foreach view, event, trigger, routine as object
    foreach object with definer=old_user 
      ALTER object DEFINER=new_user

Thanks in advance.

2
  • 2
    I think you are out of luck. Furthermore, some significant changes were made in MySQL 8.0; what version are you using?
    – Rick James
    Oct 6, 2022 at 16:39
  • I have a few clusters, some with MySQL 5.7 and some with MySQL 8.0. This problem is only on those with MySQL 5.7. When you say out of luck what do you mean?
    – CClarke
    Oct 6, 2022 at 21:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.