我有一个 Ubuntu 14.04.在运行 Owncloud 的地方安装了 LAMP 的服务器.我尝试安装 paperwork 但没有成功但这不是问题.
I have a Ubuntu 14.04. server with LAMP installed where an Owncloud is running. I tried to install paperwork which didn't work out but thats not the problem.
重新启动服务器后,我尝试再次访问自己的云,但遇到内部服务器错误.见下图.自己的云错误
After restarting my server I tried to access my owncloud again but I am facing an internal server error. See following picture. Owncloud error
我查看了日志/var/log/apache2/error.log 并且有以下短语:
I looked in the log /var/log/apache2/error.log and theres following phrase:
Lost connection to MySQL server during query' in ...
我尝试重启mysql服务但是出现这个错误:
I tried to restart the mysql service but this error appears:
stop: Unknown instance:
start: Job failed to start
然后我尝试使用 mysql -u root -p 登录到 mysql 并且出现以下错误:
Then I tried to login to mysql with mysql -u root -p and follorwing error appears:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
我用 find/-type s 在机器上寻找套接字,套接字在那里: /run/mysqld/ .我创建了一个符号链接并将其粘贴到 /var/run/mysqld/mysqld.sock
I've looked for the sockets on the machine with find / -type s and the socket was there: /run/mysqld/ .
I created a symbolic link and pasted it to /var/run/mysqld/mysqld.sock
不幸的是没有任何效果.再次重新启动后,我再也找不到套接字 find/-type s 的输出是:
Unfortnutely nothing worked. After restarting again I can't find the socket anymore the output of find / -type s is:
/dev/log
/run/php5-fpm.sock
/run/udev/control
find: `/proc/977/task/977/fd/5': No such file or directory
find: `/proc/977/task/977/fdinfo/5': No such file or directory
find: `/proc/977/fd/5': No such file or directory
find: `/proc/977/fdinfo/5': No such file or directory
更新
我已经重新安装了服务器,所以问题解决了 :D
I've reinstalled the server so problem is over :D
如果你安装了lampp服务器,先运行mysql
If you install lampp server, run mysql first
sudo /opt/lampp/lampp startmysql
然后在/var/run 中创建mysqld"目录
Then make "mysqld" directory in /var/run
cd /var/run
sudo mkdir mysqld
将你的mysql从lampp链接到/var/run/mysqld
Link your mysql from lampp to /var/run/mysqld
sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
运行 mysql -u root -p .希望能帮到你
run mysql -u root -p . hope may help you
这篇关于Ubuntu:无法通过套接字'/var/run/mysqld/mysqld.sock'连接到本地MySQL服务器(2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为