Deep analysis of Mysql.sock problems _mysql

Source: Internet
Author: User

I've seen a lot of questions about Mysql.sock on the internet before, and I didn't pay attention to the meaning of this thing, until my MySQL also appeared the same problem. It's a tangled one ...

Copy Code code as follows:

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

Online a lot of solutions, but each person's actual situation is different, I also put all the methods above all the experiment, or can not solve, I almost reload my mysql.

Then think of a solution to the problem is how exciting things ah, on the side of the heart, the patience to continue to find. See a person in the forum mentioned MySQL error log to see, I thought of to see mysql_error.log this kind of log. All are the same mistakes: the result of their carelessness!!!!!

Copy Code code 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


Results found that their own configuration file is wrong, the MySQL server is not launched, this Mysql.sock file of course can not generate. I can't find this thing ...

MySQL did not start properly until I had my profile back. Then Mysql.sock also appeared:

Copy Code code as follows:

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

Take a closer look at MySQL, first master the basic purpose and then in-depth research in the source code, internal mechanisms and so on. Come on......

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.