In Linux, mysql cannot find the mysql. sock file. _ MySQL

Source: Internet
Author: User
In Linux, mysql cannot find the mysql. sock file. Solution: bitsCN.com
Mysql cannot be found in Linux. solution to the sock File: by default, mysql compilation and installation may fail to connect to the mysq server after installation. the ERROR "ERROR 2002 (HY000 ): can't connect to local MySQL server through socket '/var/run/mysql. sock '(2) "is a headache for Cainiao. after some exploration by Cainiao, I finally found a solution. Mysql. the sock file is in the/tmp directory by default, but you can use/etc/my. cnf File (about how this file comes from, you will naturally know it when compiling and installing mysql) to change its location, as long as you specify the socket variable: "socket =/var/run/mysql. or specify the -- socket option (-S is the same) when starting mysql: $ mysql -- socket =/path/to/mysql. sock is simple ~~ Reference: http://dev.mysql.com/doc/refman/5.1/zh/problems.html#error-access-deniedhttp://dev.mysql.com/doc/refman/5.1/zh/problems.html#problems-with-mysql-sock author gh0st007bitsCN.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.