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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:54:57
Original
1250 people have browsed it

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

Related labels:
Statement of this Website
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template