MySQL error can ' t connect to local MySQL server through socket '/VAR/LIB/MYSQL/MYSQ

Source: Internet
Author: User

1,
Create/modify file/etc/my.cnf, add/modify at least one line

[MySQL] [Client]socket =/tmp/mysql.sock

#在这里写上你的mysql. Sock the correct position, usually not under/tmp/or under/var/lib/mysql/
2.
Specify an IP address to connect to MySQL using TCP instead of using the local sock method

#mysql-h127.0.0.1-uuser-ppassword

3,

#ln-S/tmp/mysql.sock/var/lib/mysql/mysql.sock

Can

This article from "Nicol Lock Silk Sorrow" blog, please make sure to keep this source http://smoke520.blog.51cto.com/9256117/1831934

MySQL error can ' t connect to local MySQL server through socket '/VAR/LIB/MYSQL/MYSQ

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.