在OSMC MediaCenter上(https://osmc.tv)我正在尝试安装MySQL服务器。我执行以下命令进行安装。
sudo apt-get install mysql-server mysql-client
安装后发生错误。
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mysql-client (5.5.49-0+deb8u1) ...
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 package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for systemd (215-17+deb8u4) ...
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
journalctl -xn
的结果-- Logs begin at Fri 2016-05-06 23:11:58 CEST, end at Sat 2016-05-07 16:44:30 CEST. --
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf pin
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: [61B blob data]
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s
May 07 16:44:25 osmc /etc/init.d/mysql[16910]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exis
May 07 16:44:25 osmc /etc/init.d/mysql[16910]:
May 07 16:44:25 osmc mysql[16111]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
May 07 16:44:25 osmc systemd[1]: mysql.service: control process exited, code=exited status=1
May 07 16:44:25 osmc systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
May 07 16:44:25 osmc systemd[1]: Unit mysql.service entered failed state.
May 07 16:44:30 osmc sudo[15538]: pam_unix(sudo:session): session closed for user root
有人知道解决方案吗?
非常感谢, 约迪
答案 0 :(得分:0)