linux mysql case insensitive lower_case_table_names=1 make server cannot be started I use mysql in linux ubuntu an I want to set lower_case_table_names = 1 in /etc/mysql/my.cnf file. But after I inserted the variable, the mysql server cannot be started.

o

Is there any way to set lower_case_table_names in my.cnf file or an other way to set it?

I have done this before, but it was in centos and mysql server was manual started.

Thank you.
Config installation by download file mysql-apt-config_0.8.14-1_all.deb from mysql website (option, if you want to install mysql 8).
Install mysql sudo apt-get install mysql-server.
Open file my.cnf in /etc/mysql, use sudo nano /etc/mysql/my.cnf.
Insert the lower_case_table_names = 1, like bellow:

[mysqld]
lower_case_table_names = 1
Save file my.cnf.
Backup the folder /etc/mysql, like sudo cp -r /etc/mysql /etc/mysql.bak
Remove mysql installation use sudo apt-get remove -y mysql-* and sudo apt-get purge -y mysql-*.
copy back the folder /etc/mysql.bak, like sudo cp-r /etc/mysql.bak /etc/mysql.
back to step 1 and 2. In step 2, the installation will ask, if you keep the config file in folder /etc/mysql or use default from installation. So, I use the config file from previous installation (N).
Finish installation
check file my.cnf. It should be the file with lower_case_table_names = 1, like step 4.


After installation, mysql will read lower_case_table_names = 1.

Hopefully this can help.