MySQL5.7报错[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock的解决方法

发现MySQL服务器因系统磁盘写满导致服务停了,清理磁盘后启动服务时无法正常启动,查看localhost.err日志发现如下报错:

[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock

解决:

查看该文件发现确实是空文件,删除该文件后再启动服务已经可以正常启动。参考链接 https://blog.csdn.net/qq_36183569/article/details/83022519

总结:

mysql.sock.lock是可读文本文件,记录了MySQL启动的PID,对应套接字文件mysql.sock.参考链接 https://bbs.csdn.net/topics/392142823 该问题是因磁盘写满导致MySQL宕了,没能正确删除mysql.sock.lock,进而导致启动失败。

原文地址:https://www.cnblogs.com/godfather007/p/10167967.html

时间: 2024-08-02 09:32:39

MySQL5.7报错[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock的解决方法的相关文章

MySQL登录报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

[[email protected] mysql3307]# /opt/mysql3307/bin/mysql -upisp [email protected]123 mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.so

长久不用的mysql报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

mac上安装过mysql: 然而,尝试连接时报错: $ mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 尝试去查看mysql.socket文件,发现没有.. $ which mysql /usr/local/bin/mysql 然后试试重启mysql: $ mysql.server start

mac 安装mysql 报错“ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2)” 解决办法

首先安装 homebrew 再 brew install mysql 之后连接 mysql 无论是登录还是修改初始密码都会报如下的错误 ERROR 2002 (HY000): Can not connect to local MySQL server through socket '/tmp/mysql.sock' (2) 运行如下解决:参考 http://www.thinksaas.cn/group/topic/347978/ unset TMPDIR mysql_install_db --v

Mac brew 安装mysql 报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket

安装mysql 最新版 56 brew install mysql 启动报错 ben:~ soul$ which mysql /usr/local/bin/mysql ben:~ soul$ mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 解决办法 运行 ben:~ soul$ mysql.server start Starting MySQL .

MySQL5.7 报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

MySQL5.7 报错 : ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement 需要重新设置密码.那我们就重新设置一下密码,命令如下: set password = password('123456'); 原文地址:https://www.cnblogs.com/Dev0ps/p/11738557.html

插入图片后R文件变红,报错“Error::app:mergeDebugResources'. > Some file crunching failed, see logs for detail”

本想做一个有爱的小东西,插入图片后发现原本之前运行成功的程序, 出现了报错“:app:mergeDebugResources'. > Some file crunching failed, see logs for detail” 一脸懵逼~~~这是什么鬼,在别人的回答和博客里找找解决办法. 不过对我好像不管用,找了好久才发现是图片的问题. 之前只是简单的在重命名的时候把图片改成“xx.png”,放在了app/src/main/res/drawable文件夹里(ps:目前每次我都是在复制图片再粘

Eclipse中mvn install 报错error in opening zip file

报错信息 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project wms: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] 错误: 读取C:\Users\Administrato

Mac mySql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)的解决办法

我的环境:Mac 10.11.6 ,mysql  5.7.14  . mac mySql 报错ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 这个错是链接时报的错,要链接必须启动.修复的时候首先要启动mysql. 首先来了解一下 mysql.sock的作用: Mysql有两种连接方式: (1),TCP/IP (2),socket 对mysql.sock来说,其

谷歌浏览器报错:跨域问题处理( Access-Control-Allow-Origin)_ 用于本地测试的快捷解决方法

报错提示如下: XMLHttpRequest cannot load http://www.xxxx.com/264/Data/GetScreenInfo. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 今天需要做一个本地测试,html中的js效果涉及跨域拉取数据的问题,Chrome报错并拒绝数