ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'

前端 未结 30 1380
南旧
南旧 2020-12-04 05:14

I installed MySQL on Mac OS X Mountain Lion with homebrew install mysql, but when I tried mysql -u root I got the following error:

30条回答
  •  孤街浪徒
    2020-12-04 05:45

    A lot of other helpful responses here, but nothing fixed this for me. Ultimately nothing I found on this site or others would get any version of MySQL from Homebrew working for me.

    It was super painless to just download the DMG from https://dev.mysql.com/downloads/file/?id=479114 (find the appropriate version you need) and let the wizard install it for me. The only other manual step was adding /usr/local/mysql/bin to my PATH.

    I'd recommend this option if brew is giving you trouble.

    Update - if this still doesn't fix it, try completely purging mysql before installing via DMG. Follow these instructions: https://gist.github.com/vitorbritto/0555879fe4414d18569d

提交回复
热议问题