简体   繁体   English

无法启动MySQL守护程序:分段错误

[英]Unable to start MySQL daemon: segmentation fault

MySQL daemon (well, actually is MariaDB daemon) doesn't start anymore. MySQL守护程序(实际上是MariaDB守护程序)不再启动。 /var/log/mysql.err is empty. /var/log/mysql.err为空。 dmesg gives me this error: dmesg给我这个错误:

[ 1042.816803] mysql_upgrade[11409]: segfault at ffffffe0 ip b7523515 sp bf823300 error 5 in mysql_upgrade[b750b000+2b2000] [1042.816803] mysql_upgrade [11409]:mysql_upgrade中ffffffe0 ip b7523515 sp bf823300错误5出现segfault [b750b000 + 2b2000]

For what I know mysql_upgrade is used when you upgrade MySQL... I do not know why it's invoked at MySQL start, since I've not upgraded it (it's the latest version, fresh install). 对于我所知道的,在升级MySQL时会使用mysql_upgrade ...我不知道为什么在MySQL启动时调用它,因为我还没有升级它(它是最新版本,全新安装)。

It worked until yesterday and I do not know what I could have done... The only thing I changed is that I added these lines to my.cnf: 它一直工作到昨天,我不知道该怎么办...我唯一改变的是我在my.cnf中添加了以下几行:

# *UTF-8*
character_set_server = utf8
collation_server = utf8_general_ci

# *STRICT MODE*
sql_mode = "REAL_AS_FLOAT, PIPES_AS_CONCAT, ANSI_QUOTES, TRADITIONAL"
innodb_strict_mode = ON

but I tried to uncomment them without success. 但是我试图取消对他们的评论,但没有成功。

I'm using MariaDB 5.5.31 on Ubuntu 13.04. 我在Ubuntu 13.04上使用MariaDB 5.5.31。

I've found the problem: it seems that you can't add spaces to sql_mode. 我发现了问题:看来您无法在sql_mode中添加空格。 This bug happens to MySQL as well. 这个错误也发生在MySQL。 So you have to write: 所以你必须写:

sql_mode = "REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,TRADITIONAL"

It seems a bug, since on MySQL and MariaDB documentations have examples with whitespaces. 这似乎是一个错误,因为在MySQLMariaDB文档中都有带空格的示例。

The strange fact is that I had to uninstall MariaDB and reinstall it to work again with it, but this time when I readded the sql_mode setting, started the daemon, removed the sql_mode and restarted the daemon, it worked and I had not to reinstall it another time. 奇怪的事实是,我必须卸载MariaDB并重新安装它才能再次使用它,但是这一次,当我读取sql_mode设置,启动守护程序,删除sql_mode并重新启动守护程序时,它可以正常工作,而我无需重新安装它下一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM