首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Mysql在我的raspberry pi运行raspian时失败

Mysql在我的raspberry pi运行raspian时失败
EN

Stack Overflow用户
提问于 2017-06-18 06:46:03
回答 1查看 459关注 0票数 0

我目前在我的树莓派上使用wordpress。就在最近,我试图连接到apache web服务器,但得到了一个有趣的错误。Error establishing a database connection.,所以我搜索并摆弄了一下我的树莓派,发现mysql服务不再运行了。我做了一个systemctl status mysql.service -l,得到了对我来说是一种外语的疯狂的长输出:

代码语言:javascript
复制
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新手

EN

回答 1

Stack Overflow用户

发布于 2017-10-11 16:27:48

请这样做,推荐一下。

sudo service mysql stop

/usr/bin/mysql_install_db --user=mysql

然后是sudo service mysql start

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44610094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档