Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud SQL disable Table Name Case Sensitivity

Is there a way to change the setting to disable table name case sensitivity? I know that in the .cnf all you have to do is add this;

lower_case_table_names = 1

Although I cannot seem to find a way to do that. Thanks

like image 328
Xaphann Avatar asked Dec 20 '22 06:12

Xaphann


2 Answers

You can do it either from the Developers Console or from the Google Cloud SDK:

Developers Console

  1. Go to the Developers Console and click on your project.

  2. Go to Storage -> Cloud SQL -> select your instance and click on 'Edit'.

  3. In the MySQL Flags section, click on 'Choose a Flag' and select lower_case_table_names.

  4. Two new text boxes are appended to your MySQL FLAGS. Type in the right text box: 1.

  5. Save the changes.

Cloud SDK

You can install the Cloud SDK in your computer and run these commands:

  1. gcloud auth login

  2. gcloud sql instances patch YOUR_INSTANCE_NAME --database-flags lower_case_table_names=1 --project YOUR_PROJECT_ID

You can find more information about the supported MySQL flags in the documentation.

like image 115
Adrián Avatar answered Jan 05 '23 12:01

Adrián


You can set it in the "advance options" section for the Cloud SQL instance at Google Developers Console (sorry I don't have enough reputation to post images...)

For an existing instance, you need to restart it for the flag to take effect.

like image 42
Herman Avatar answered Jan 05 '23 11:01

Herman