It seems to be a lot of trouble to get MySQL running with lower_case_table_names=1
as can be seen in:
- lower_case_table_names=1 on Ubuntu 18.04 doesn't let mysql to start
- lower_case_table_names Settings in MySQL 8.0.12
- Set up mysql 8 with lower_case_table_names on CentOS 7
- Mysql : can't set lower_case_table_names variable
- lower_case_table_names option not working
I'm trying to install MySQL 8.0.19 on Ubuntu Server 20.04 LTS. lower_case_table_names=1
cannot be set after mysql has already been initialized, which happens automatically when installing from the package repositories.
According to the documentation Server System Variables | sysvar_lower_case_table_names:
For APT installations on Debian and Ubuntu, however, the server is initialized for you, and there is no opportunity to configure the setting in an option file beforehand. You must therefore use the
debconf-set-selection
utility prior to installing MySQL using APT to enablelower_case_table_names
. To do so, run this command before installing MySQL using APT:sudo debconf-set-selections <<< "mysql-server mysql-server/lowercase-table-names select Enabled"
I did that on a freshly installed Ubuntu Server 20.04 and ran sudo apt-get install mysql-server
afterwards, but it did not change lower_case_table_names
to 1.
If at all, what am I doing wrong? How can I successfully install MySQL 8.0 with lower_case_table_names
set to 1?