Home > Database > Mysql Tutorial > body text

深入解析mysql.sock不见的问题_MySQL

WBOY
Release: 2016-06-01 13:24:44
Original
1033 people have browsed it

bitsCN.com

之前在网上看过好多关于mysql.sock不见的问题,并没有关注这个东西存在的意义,直到自己的mysql也出现了相同的问题。让人纠结了一把……

zhouqian@zhou:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

网上好多的解决办法,可是每个人的实际情况不同,我也是把上面所有人的方法实验了一个遍,还是不能解决,我差点儿就重装了我的mysql。

后来想着解决问题是一件多么让人兴奋的事情啊,就横着心,耐着性子继续找下去。看到有个人在论坛里提到mysql的错误日志查看,我就想到了去查看mysql_error.log这种日志。全部都是同样的错误:自己的粗心大意造成的结果啊!!!!!

111205 21:19:55  InnoDB: Started; log sequence number 0 87713
111205 21:19:55 [ERROR] /usr/sbin/mysqld: unknown variable 'replication_wild_do_table=db_test.tb1'
111205 21:19:55 [ERROR] Aborting

111205 21:19:55  InnoDB: Starting shutdown...
111205 21:20:00  InnoDB: Shutdown completed; log sequence number 0 87713
111205 21:20:00 [Note] /usr/sbin/mysqld: Shutdown complete

结果发现自己的配置文件写错了,mysql服务器就是启动不了,这个mysql.sock文件当然生成不了。就找不到这个东西了……

在我重新该过我的配置文件,mysql才正常启动了。这时mysql.sock也就出现了:

root@zhou:/var/run/mysqld# ls
mysqld.sock
root@zhou:/var/run/mysqld#

慢慢了解mysql吧,先掌握了基本用途然后在深入研究源码,内部机制等。加油……

bitsCN.com
Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template