我目前在我的树莓派上使用wordpress。就在最近,我试图连接到apache web服务器,但得到了一个有趣的错误。Error establishing a database connection.,所以我搜索并摆弄了一下我的树莓派,发现mysql服务不再运行了。我做了一个systemctl status mysql.service -l,得到了对我来说是一种外语的疯狂的长输出:
Jun 17 22:06:58 Latridell_Server /etc/init.d/mysql[5630]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jun 17 22:06:58 Latridell_Server /etc/init.d/mysql[5630]: [61B blob data]
Jun 17 22:06:58 Latridell_Server /etc/init.d/mysql[5630]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jun 17 22:06:58 Latridell_Server /etc/init.d/mysql[5630]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jun 17 22:06:58 Latridell_Server /etc/init.d/mysql[5630]:
Jun 17 22:06:58 Latridell_Server mysql[4891]: Starting MySQL database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Jun 17 22:06:58 Latridell_Server systemd[1]: mysql.service: control process exited, code=exited status=1
Jun 17 22:06:58 Latridell_Server systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Jun 17 22:06:58 Latridell_Server systemd[1]: Unit mysql.service entered failed state.有没有人能做点什么?
提前感谢您的帮助!
mysql和linux世界中的-A新手
发布于 2017-10-11 16:27:48
请这样做,推荐一下。
sudo service mysql stop
/usr/bin/mysql_install_db --user=mysql
然后是sudo service mysql start
https://stackoverflow.com/questions/44610094
复制相似问题