1、修改my.cnf后,执行 service mysql restart 重启数据库失败
service mysql restart Shutting down MySQL.. SUCCESS! Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_12_centos.pid)
2、查看日志:
cat VM_0_12_centos.err |grep ERROR 2018-02-27 22:33:50 923 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable ‘default-character-set=utf8‘ 2018-02-27 22:33:50 923 [ERROR] Aborting
3、很明显是没有default-character-set这个变量
4、查了下资料得知 character_set_server来取代 default-character-set
5、修改my.cnf。将default-character-set=utf8 换成character_set_server=utf8。重启数据库,启动成功。
mysql:unknown variable 'default-character-set=utf8'
原文地址:https://www.cnblogs.com/sandyyeh/p/8481444.html
时间: 2024-11-14 04:41:37