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

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

问题描述

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

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服务器.我通常会运行stop命令,然后再次启动它:

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 Server无法在Raspberry Pi上启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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