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
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!