• notice
  • Congratulations on the launch of the Sought Tech site

In-depth analysis of mysql.sock disappearance

I have read a lot about the mysql.sock missing problem on the Internet before, and I didn’t pay attention to the existence of this thing.Meaning, until my own mysql also had the same problem.It makes people confused...

The code is as follows:

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

There are many online The solution, but everyone's actual situation is different, I also tried all the methods above, but still can't solve it, I almost reinstalled my mysql.

Later, thinking about how exciting it is to solve the problem, I kept my mind and patience and continued to look for it.Seeing that someone mentioned mysql's error log viewing in the forum, I thought of checking mysql_error.log this kind of log.All are the same mistake: the result of my own carelessness! ! ! ! !

The code is as follows:

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

As a result, I found that my configuration file was written incorrectly, and the mysql server could not be started.Of course, the mysql.sock file could not be generated.I can’t find this thing...

After I rechecked my configuration file, mysql started normally.At this time mysql.sock also appeared:

The code is as follows:

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

Slowly understand mysql, first master the basics The purpose is then in-depth study of the source code, internal mechanisms, etc.Come on...


Technical otaku

Sought technology together

Related Topic


Leave a Reply