Home > Database > Mysql Tutorial > MySQL字符集问题

MySQL字符集问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:46:52
Original
1047 people have browsed it

最近有个小项目需要修改MySQL的字符集,所以按照网上的教程修改,发现MySQL不能启动 然后网上说是,/etc/my.cnf设置的问题,貌项目中MySQL是用rpm安装的,在etc中没有my.cnf,所以按照晚上的教程自己写了一个my.cnf放在etc文件夹下,启动失败。删除my.cnf,M

最近有个小项目需要修改MySQL的字符集,所以按照网上的教程修改,发现MySQL不能启动

然后网上说是,/etc/my.cnf设置的问题,貌似项目中MySQL是用rpm安装的,在etc中没有my.cnf,所以按照晚上的教程自己写了一个my.cnf放在etc文件夹下,启动失败。删除my.cnf,MySQL服务启动成功。

所以应该是my.cnf的设置问题,打开/var/lib/mysql/localhost.localdomain.err文件,查看发现了错误,/usr/bin/mysqld: unknown variable 'default-character-set=utf8' 注释my.cnf中的这条语句,启动成功,上网查找,发现网上有大牛说,用character_set_server=utf8来取代 default-character-set=utf8   

MySQL服务重启成功,查看字符集,修改成功

MySQL字符集问题

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template