Can't Fix Mariadb & Mysql ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2) On MacOs

26 views Asked by At

Recently I Found This Error For log in to my mysql and mariadb on My UnixBase MacOS. And i try similar Ways in StackOverFlow To fix this problem. but problem not solved.

Terminal Error

i try systemctl to check mariadb or mysql is running.

enter image description here

But it seems systemctl command is not available on macOS system.

Then i try to look at mariadb version.

enter image description here

i use this StackOverFlowLink. But Nothing Changes

Actually i use my mariadb server for about one year on my MacOS, And I dont know why this trouble happened recently.

1

There are 1 answers

1
danblack On

systemctl is systemd, which is Linux only.

brew services start mariadb is for MacOS.

ref