In-depth analysis of mysql. sock problems _ MySQL

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.