安装时出现 mySQL 问题

安装时出现 mySQL 问题

我在安装 mySQL 时遇到了很大的麻烦。

日志(/var/log/debug)中的错误消息是:

    Nov 20 11:17:41 gotfarm1 /etc/init.d/mysql[11880]: 0 processes alive and      '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Nov 20 11:17:41 gotfarm1 /etc/init.d/mysql[11880]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Nov 20 11:17:41 gotfarm1 /etc/init.d/mysql[11880]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 20 11:17:41 gotfarm1 /etc/init.d/mysql[11880]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

重新安装该进程后:

invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server
Counting objects: 1171, done.
Compressing objects: 100% (723/723), done.
Writing objects: 100% (1171/1171), done.
Total 1171 (delta 71), reused 1140 (delta 61)
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您是否安装了一些软件包并且安装被中断了?

尝试用 修复该问题sudo apt-get install -f

相关内容