CentOS下mysql启动失败

前端之家收集整理的这篇文章主要介绍了CentOS下mysql启动失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

今天用

service MysqLd start

命令启动MysqL失败
查看MysqL日志
tail -n 10 /var/log/MysqL.log

160702 04:41:17 MysqLd_safe Starting MysqLd daemon with databases from /var/lib/MysqL
160702  4:41:17 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
Unknown suffix ' ' used for variable 'lower_case_table_names' (value '1 //表名不区分大小写(此与编码无关)')
160702  4:41:17 [ERROR] /usr/libexec/MysqLd: Error while setting value '1 //表名不区分大小写(此与编码无关)' to 'lower_case_table_names'
160702  4:41:17 [ERROR] Aborting

160702 04:41:17 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended

原来是之前修改配置文件惹得祸

vim /etc/my.cnf

修改配置参数,修改对应的[MysqLd]节点下的: lower_case_table_names=1一行
去掉多余的注释后可以正常启动
但是执行查询语句时select * from A1;报错a1 not exists; 没办法,手起刀落人抬走,dd(vim)删掉那一行,搞定! Yeah~

原文链接:https://www.f2er.com/centos/381767.html

猜你在找的CentOS相关文章