3

I have a Google Cloud SQL instance with a default server collation of utf8_general_ci. I'd like to change this to utf8_unicode_ci. How can I do this?

Before, I could go to the "old" Google Cloud SQL console and run SQL as a super-admin; I thought I could make the change this way. However, I don't see this link anywhere in the new console, and when running SQL remotely (even as root), I cannot perform super-admin changes.

I've also looked at configuring MySQL flags, but only the character set is available for modification (character_set_server), not the collation.

Is there a way I can change the default server collation to utf8_unicode_ci in a Google Cloud SQL instance?

2 Answers 2

3

Use Google Cloud SQL API to change the collation value of your GCS databases. In this case, use patch method as you want to do a partial update of the databases settings. You can do this through APIs Explorer Try it!.

1
  • Thanks for the info! Is there a way to do this instance-wide? Or just for individual databases? Unfortunately, doing it for individual DBs does not solve the collation problem I'm having. Sep 4, 2015 at 12:26
1

Unfortunately, there appears to be no way to do this currently.

The other answer demonstrates how to edit the collation for specific databases, not server-wide. The Google Cloud SQL API does not seem to have a method for doing this server- or instance-wide.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .