Can & #39; t connect to local MySQL server through socket & #39;/var/run/mysqld. sock & #39; solution: mysqldmysqld. sock

Source: Internet
Author: User

Can't connect to local MySQL server through socket '/var/run/mysqld. sock', mysqldmysqld. sock
After installing mysql, the following error occurs: Can't connect to local MySQL server through socket '/var/run/mysqld. sock ', tried online methods are useless, so open/etc/my. view cnf. See this section: # The MySQL server 26 [mysqld] 27 port = 3306 28 socket =/tmp/mysql. sock 29 skip-external-locking 30 log-error =/alidata/log/mysql/error. log 31 key_buffer_size = 16 M 32 max_allowed_packet = 1 M 33 table_open_cache = 64 34 sort_buffer_size = 512 K 35 net_buffer_length = 8 K 36 read_buffer_size = 256 K 37 bytes = 512 K 38 bytes = 8 yes, used. the sock file is/tmp/mysql. sock instead of/var/run/mysqld. sock, add a link ln-s/tmp/mysql. sock/var/run/mysqld. sock Solution

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.