刚刚安装MySQL8,安装过程一切顺利,但是在配置文件设置表名不区分大小写属性lower_case_table_names=1
之后启动报错
2018-04-21T07:11:57.780537Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.11) MySQL Community Server - GPL.
2018-04-21T07:11:58.115925Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.11) starting as process 3280
2018-04-21T07:11:58.377514Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').
2018-04-21T07:11:58.377736Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2018-04-21T07:11:58.377782Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-04-21T07:11:59.809504Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.11) MySQL Community Server - GPL.
试过设成0和2都没问题,就是无法设置成1.
遇到同样问题,翻看MySQL官方文档发现
lower_case_table_names can only be configured when initializing the server. Changing the lower_case_table_names setting after the server is initialized is prohibited.
别指望了改了
经过尝试,只有在安装完成之后,初始化数据库之前,修改my.cnf
然后再初始化数据库才有效