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.
Best Answer
mysql-apt-config_0.8.14-1_all.deb
from mysql website (option, if you want to install mysql 8).sudo apt-get install mysql-server
.my.cnf
in/etc/mysql
, usesudo nano /etc/mysql/my.cnf
.Insert the
lower_case_table_names = 1
, like bellow:[mysqld] lower_case_table_names = 1
Save file
my.cnf
./etc/mysql
, likesudo cp -r /etc/mysql /etc/mysql.bak
sudo apt-get remove -y mysql-*
andsudo apt-get purge -y mysql-*
./etc/mysql.bak
, likesudo cp-r /etc/mysql.bak /etc/mysql
./etc/mysql
or use default from installation. So, I use the config file from previous installation (N).my.cnf
. It should be the file withlower_case_table_names = 1
, like step 4.After installation, mysql will read
lower_case_table_names = 1
.Hopefully this can help.