Can't connect to local MySQL server through socket homebrew

后端 未结 21 1931
萌比男神i
萌比男神i 2020-12-04 05:54

I recently tried installing MySQL with homebrew (brew install mysql) and when I try to run it I get the following error:

ERROR 2002 (HY00

21条回答
  •  Happy的楠姐
    2020-12-04 06:17

    I had same problem. After trying all these methods without success I did the following:

    tail -f the-mysql-or-maria-db-error-file.err
    

    in another console:

    brew services restart mariadb
    

    I saw the following error:

    "MAC HOMEBREW Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with"

    So I changed the tc.log extesion to tc.log.txt and restart mariadb

    brew services restart mariadb
    

    and done!

提交回复
热议问题