MySQL 5.6 无法启动或记录到日志文件

MySQL 5.6 无法启动或记录到日志文件

我需要使用 mySQL 5.6 功能(在 Ubuntu 上),因此我卸载了从 apt-get 获取的版本,然后下载并编译了 mySQL 5.6 源代码。它安装正常,但我无法启动 mysqld。当我运行命令时,sudo /usr/local/mysql/bin/mysqld我得到以下输出:

2013-02-25 10:03:47 11597 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2013-02-25 10:03:47 11597 [Note] Plugin 'FEDERATED' is disabled.
2013-02-25 10:03:47 11597 [Note] InnoDB: The InnoDB memory heap is disabled
2013-02-25 10:03:47 11597 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-02-25 10:03:47 11597 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-02-25 10:03:47 11597 [Note] InnoDB: CPU does not support crc32 instructions
2013-02-25 10:03:47 11597 [Note] InnoDB: Using Linux native AIO
2013-02-25 10:03:47 11597 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-02-25 10:03:47 11597 [Note] InnoDB: Completed initialization of buffer pool
2013-02-25 10:03:47 11597 [Note] InnoDB: Highest supported file format is Barracuda.
2013-02-25 10:03:48 11597 [Note] InnoDB: 128 rollback segment(s) are active.
2013-02-25 10:03:48 11597 [Note] InnoDB: Waiting for purge to start
2013-02-25 10:03:48 11597 [Note] InnoDB: 1.2.10 started; log sequence number 2431209696
2013-02-25 10:03:48 11597 [ERROR] Aborting

然后它会打印一堆有关各种插件关闭的消息。我想知道它为什么无法启动,所以我试图让它记录更具体的错误消息。我尝试创建文件 /usr/share/mysql/errmsg.sys,但当我尝试启动它时,它只会打印其他错误,所以我再次删除了该文件。我查看了 /etc/mysql/my.cnf 并取消注释了以下行:

 general_log_file        = /var/log/mysql/mysql.log
 general_log             = 1

然后我创建了文件 /var/log/mysql/mysql.log,将其所有权更改为 mysql:adm,并尝试再次启动它,但它不会写入该文件。

有什么建议可以尝试一下吗?谢谢!

答案1

Mark Wagner 的评论是正确的。我可以通过运行命令sudo cp /usr/local/mysql/share/english/errmsg.sys /usr/share/mysql/errmsg.sys和来修复该问题sudo chown mysql:mysql /usr/share/mysql/errmsg.sys。请参阅https://askubuntu.com/questions/102875/ysql-5-5-starts-and-then-instantly-stops-on-ubuntu-10-10了解更多信息。

相关内容