Mac OS x under MySQL appears can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2) issue

Source: Internet
Author: User

A lot of similar online, mostly said to modify the my.cnf, in my case does not work, in addition, many are Linux under, tried for a long time, the final reason is quite simple: MySQL service did not get up.

Because the Mysql.sock file is not very familiar, the beginning of a very large time wasted on this, after the reload is not, and then entered the/usr/local/mysql/bin/under the use of Mysqld start, the following problems occur

Okay, I started with root, and the results came back.

Please read "Security" sections of the manual to find out how to run mysqld as root!

Finally know, MySQL for security, do not want the root user to start MySQL directly, on this issue, you can refer to (http://blog.csdn.net/jubincn/article/details/6725582). So, the final solution is

sudo./mysqld--user=root

Mac OS x under MySQL appears can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (2) issue

Related Article

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.