今天早上更新后,我们遇到了一些奇怪的问题。首先,apt-get upgrade
配置过程中失败,并显示无法启动服务的消息。然后我们尝试了dpkg-reconfigure
,apt-get purge
然后apt-get install
又尝试了apt-get install --reinstall
,但都没有成功。
经过一段时间的尝试后,我们尝试mysqld
以 root 身份运行:
# mysqld --verbose
130809 15:31:15 [Note] Plugin 'FEDERATED' is disabled.
130809 15:31:15 InnoDB: The InnoDB memory heap is disabled
130809 15:31:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130809 15:31:15 InnoDB: Compressed tables use zlib 1.2.3.4
130809 15:31:15 InnoDB: Initializing buffer pool, size = 128.0M
130809 15:31:15 InnoDB: Completed initialization of buffer pool
130809 15:31:15 InnoDB: highest supported file format is Barracuda.
130809 15:31:15 InnoDB: Waiting for the background threads to start
130809 15:31:16 InnoDB: 5.5.32 started; log sequence number 357746282514
130809 15:31:17 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130809 15:31:17 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130809 15:31:17 [Note] Server socket created on IP: '0.0.0.0'.
130809 15:31:17 [Note] Event Scheduler: Loaded 0 events
130809 15:31:17 [Note] mysqld: ready for connections.
Version: '5.5.32-0ubuntu0.12.04.2-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
并且运行正常。因此,在查看日志文件时,我们注意到以下几点:
130809 10:15:37 InnoDB: Starting shutdown...
130809 10:15:39 InnoDB: Waiting for 200 pages to be flushed
130809 10:16:02 InnoDB: Shutdown completed; log sequence number 357736350943
130809 10:16:02 [Note] /usr/sbin/mysqld: Shutdown complete
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
10:15 是升级开始的时间。每次我们尝试mysql-server
使用 init.d 脚本或service mysql start
命令启动时,它都会简单地添加另一行,如最后 4 行。
因此,虽然我们可以在 a 中运行服务器screen
并在每次服务器重新启动时手动启动它,但这非常烦人。我们可以做些什么来解决这个问题?
答案1
自上周五更新以来,我遇到了同样的问题。有一个旧的 Ubuntu 错误已经存在了很长一段时间,似乎与此有关:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951
该线程中建议了各种修复/解决方法(包括一些清除+重新安装),但最近发布的解决方法对我来说很有效,也可能对您有用:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951/comments/37
祝你好运。