zl程序教程

您现在的位置是:首页 >  后端

当前栏目

Different lower_case_table_names settings for server ('1')

server for &# 39 Table case settings different
2023-09-11 14:16:16 时间

 

 

MySQL8,新增data dictionary,数据初始化的时候在Linux下默认使用lower_case_table_names=0的参数,数据库启动的时候,读取/etc/my.cnf中的值,如果/etc/my.cnf中的值与数据库初始化时的值不一样,则会报如下错误

 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

MySQL官方提供的rpm包,默认禁用

lower_case_table_names=0

 

--官方解释:
After initialization, is is not allowed to change this setting.So "lower_case_table_names" needs to be set together with --initialize .

 

此参数需数据库初始化的值和启动是的值需相等

 

重新初始化

mysqld --user=mysql --lower_case_table_names=1 --initialize-insecure --basedir=/usr/local/mysql --datadir=/data/mysql