Home >Database >Mysql Tutorial >MySQL下mysql.sock丢失问题的解决

MySQL下mysql.sock丢失问题的解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:54:571253browse

MySQL下mysql.sock丢失丢失的原因一般是因为配置文件不一致的原因,mysqld 错误启动,mysqld_safe 会清除一次mysql.sock 。解决方

转自:ehome.com.ru

MySQL下mysql.sock丢失丢失的原因一般是因为配置文件不一致的原因,mysqld 错误启动,mysqld_safe 会清除一次mysql.sock 。解决方法是:

判断一般人解决故障时没有切换到mysql用户,造成权限有问题,无法创建mysql授权表,,所以也就无法创建/tmp/mysql.sock 和hostname.pid文件。因此,总结解决方法如下:

#su mysql

$/usr/local/bin/mysql_install_db     //重建授权表

$/usr/local/bin/mysqld_safe &      

$/usr/local/bin/mysql                //测试

mysq>bye;

$

文件已经解决,重新生成新的 /tmp/mysql.sock 和 hostname.pid

$su root

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn