No response from the server (or the socket on the local MySQL server is not correctly configured) _ MySQL

Source: Internet
Author: User
The server does not respond (or the socket on the local MySQL server is not correctly configured) bitsCN.com

First case: (The host. MYD is lost due to deep garbage cleaning)

Just like many netizens! With wamp (or xampp, speedphp), you can easily build a server environment on your XP and Win7 systems. in this way, you can locally test the beautiful Php + mysql website and start wamp, open http: // localhost/phpmyadmin in the browser. the database can be opened normally ...... Okay, it's time to go!

Here is the problem: when I use the "cube"'s "in-depth garbage cleanup", I start wamp again and open http: // localhost/phpmyadmin in the browser, "#2002 server does not respond (or...)" appears ......)".

Cause: host. MYD File loss, host. the MYD file is a 0-byte file, which does not contain any content. However, it is called when mysql is started and some temporary messages are written, while the 'Cube 'is used to clean up garbage in depth, I select to scan empty files and empty folders, and then host. MYD has been scanned and deleted. if wamp is started again, the above problem occurs. the MYD attribute is set to 'readonly' to prevent accidental deletion, but I am making an unforgivable low-level error, host. if MYD is 'readonly', mysql cannot be stored in the host. write temporary information in MYD. The result is to start wamp and open http: // localhost/phpmyadmin in the browser. "#2002 server does not respond (or...)" still appears ......)".

Solution: Find the host in the installation directory when wamp is installed for the first time. the path of MYD is "C:/wamp/bin/mysql/mysql5.5.20/data/mysql/host. MYD (I installed wamp in the C root directory by default) ", you can choose to upload a host.myd, then create an empty text file. txt" and change it to "host. MYD, put it in the correct path.

Case 2: (mysql cannot be started due to firewall blocking)

Cause: The local mysql server is not started.

Solution: Step 1. find the mysql installation path D:/Program Files/MySQL Server 5.1/bin.

Second, double-click the mysqld.exe file. if the windows Firewall prompts a blocking prompt box, click unblocking.

Case 3: (the ip address bound to the mysql socket file is invalid)

Cause: if no host name is specified or a special host name localhost is specified, Unix socket is used. the default value of Unix socket is/tmp/mysql. sock, and the local machine does not configure such a socket file, so naturally the connection fails.

Solution: Find The phpmyadmin folder under wamp/phpmyadmin (depending on the path you have installed), find the config. inc. php file, and use notepad

(Notepad) open the software and find $ cfg ['servers'] [$ I] ['host'] = 'localhost'; and then change the localhost to 127.0.0.1. Some netizens suggest adding $ cfg ['servers'] [$ I] ['hide _ db'] = 'information _ scheme'; // The information_schema database is invisible after login, it doesn't matter if this sentence is not added.

See the official documentation for details: http://dev.mysql.com/doc/refman/5.1/zh/index.html

Source: http://blog.micxp.com/index.php/archives/64/

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.