lower_case_table_names Settings in MySQL 8.0.12

2019-03-04 15:43发布

问题:

I've just compiled the version MySQL 8.0.12 in a Ubuntu 16.0.4.

After following the instructions in the website and making the following my.cnf file:

[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
port=3306
log-error=/usr/local/mysql/data/localhost.localdomain.err
user=mysql
secure_file_priv=/usr/local/mysql/mysql-files
local_infile=OFF

log_error = /var/log/mysql/error.log

# Remove case sensitive in table names
lower_case_table_names=1

I get the following error:

2018-08-11T19:45:06.461585Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

What should I change so that data dictionary is aligned to server settings?

回答1:

As per this link, lower_case_table_names should be set together with --initialize option.



回答2:

sudo /etc/init.d/mysql start --initialize lower_case_table_names=1



回答3:

I had the same problem and as described here https://bugs.mysql.com/bug.php?id=90695 this is not supported out of the box. So the workaround that I did in order to make it work was this lower_case_table_names=1 on Ubuntu 18.04 doesn't let mysql to start