MySQL Error 2002 can't connect to local MySQL for Mac

MySQL Error 2002 can't connect to local MySQL for Mac



ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
This is a fix for Mac Os X

Nguồn: https://kythuatmarketingonline.com/

Xem thêm bài viết: https://kythuatmarketingonline.com/category/cong-nghe

18 thoughts on “MySQL Error 2002 can't connect to local MySQL for Mac

  1. VIKRAMs-MacBook-Pro:~ vikramsingh$ mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    VIKRAMs-MacBook-Pro:~ vikramsingh$ sudo mkdir /var/mysql
    VIKRAMs-MacBook-Pro:~ vikramsingh$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    ln: /var/mysql/mysql.sock: File exists
    VIKRAMs-MacBook-Pro:~ vikramsingh$ mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    VIKRAMs-MacBook-Pro:~ vikramsingh$

    I executed your commands, still the same error, here you can see.. I executed same commands again so it says file exist but when i run mysql it gives error.
    Please if you can help immediately

  2. For Mac users, I suggest you use MAMP and install that instead. I had it up and running and it's brilliant for running your own testing server on your own Mac. MAMP runs MySQL, Apache and PHP all in one go. Just download the regular version. You won't need the Pro version.

  3. For Mac users, I suggest you use MAMP and install that instead. I had it up and running and it's brilliant for running your own testing server on your own Mac. MAMP runs MySQL, Apache and PHP all in one go. Just download the regular version. You won't need the Pro version.

  4. Please feel welcome to add helpful information about the MySQL 2002 connection issues for Mac & Windows. I ran into an issue between the MAMP server and my Dreamweaver CS4 failing to connect with my MySQL databases. Let me know if you need the settings I used that eventually solved the problem and finally connected my Dreamweaver CS4 to the MySQL running on my local server.

Leave a Reply

Your email address will not be published. Required fields are marked *