In-depth analysis of mysql. sock missing problems bitsCN.com
I have read a lot of questions about mysql. sock on the internet before, but I didn't pay attention to the significance of this issue until I encountered the same problem in my mysql. It's confusing ......
Zhouqian @ zhou :~ $ Mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld. sock' (2)
There are many solutions on the Internet, but the actual situation of each person is different. I tried all the methods above and still cannot solve the problem. I almost re-installed my mysql.
Then I thought about how exciting it was to solve the problem, so I went on searching with patience. When I saw a person who mentioned mysql error log viewing in the forum, I thought of viewing the log like mysql_error.log. All are the same errors: the result of your carelessness !!!!!
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
The result shows that the configuration file is wrong. the mysql server cannot be started, and the mysql. sock file cannot be generated. I cannot find this thing ......
After I re-configured my configuration file, mysql started normally. Then mysql. sock appears:
Root @ zhou:/var/run/mysqld # ls
Mysqld. sock
Root @ zhou:/var/run/mysqld #
Take a closer look at mysql, master the basic purpose, and then study the source code and internal mechanisms. Come on ......
BitsCN.com