mysql服务启动失败(Aborting)
- 今天在mysql里写入数据时,发现中文无法使用,要更改默认字符集为utf-8才行,为了减少每次都更该字符的麻烦,于是在mysql的配置文件my.ini里找到字符集的位置,默认设置是lartin(大概)。然后将字符集改为utf-8时,然后重启服务,发现服务已经重启不了,在系统日志里发现报的是这个错误。
- 在mysql/bin 目录下,使用命令
mysqld --console
查看系统日志,发现还是报错了,错误如下:
Character set 'utf-8' is not a compiled character set and is not specified in the 'C:\Program Files\MySQL\MySQL Server 5.5\share\charsets\Index.xml' file
后来百度发现是因为my.ini里的字符不能写成utf-8
,而是要写成utf8
,太尴尬了,记录一下。