2016-01-24 120 views
1

我試過使用this tutorial將LAMP安裝到我的Mac上。我從官方網站安裝了MySQL到我的Mac(OS X El Capitan 10.11.3)。我在.bash_profile中爲mysql和mysqladmin編寫了別名。所以當我嘗試鍵入mysql命令時,它會以
error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)來回應我。
無法在Mac上運行MySQL

我已經鍵入perror 38並得到下一個:在非套接字上的套接字操作。怎麼了?

回答

0

我認爲mysql服務器沒有運行。從

開始

sudo /usr/local/mysql/support-files/mysql.server start並重試。

確保它是由(有時mysqld的,如果有任何錯誤都將被殺死)

ps aux | grep mysql

+1

由於運行!這樣可行 –