MySQL 服务器无法在 Raspberry Pi 上启动 [英] MySQL Server does not start on Raspberry Pi

查看:34
本文介绍了MySQL 服务器无法在 Raspberry Pi 上启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用运行 Debian Linux 的 Raspberry Pi.我正在尝试安装 MySQL 服务器并运行它,这是我所做的:

I am working with a Raspberry Pi running Debian Linux. I am trying to install MySQL Server and run it and here is what I have done:

# sudo apt-get install mysql-server mysql-client php5-mysql

没有错误.现在我重新启动了系统,然后在启动时我得到:

No errors. Now I rebooted the system, then when starting up I get:

[FAIL] startpar: service(s) returned failure: mysql ... failed!

我试过了

# sudo service mysql start
mysql: unrecognized service

最后我试过了

# /etc/init.d; mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

我发现/var/run 中没有名为 mysqld 的文件夹.但是我读到这里的sock文件要在第一次创建服务器时创建?

I find that I have no folder named mysqld in /var/run. But I read that the sock file here shall be created the first time the server is created?

您有什么建议吗?

推荐答案

看起来你的 mysql 服务器没有启动.我通常运行停止命令,然后再次启动它:

Looks like your mysql server is not started. I usually run the stop command and then start it again:

mysqld stop
mysql.server start

同样的错误,这对我有用.

Same error, and this works for me.

这篇关于MySQL 服务器无法在 Raspberry Pi 上启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆