开发者

Setting up MySQL server on OSX 10.7 (Lion) using Homebrew

I have successfully installed MySQL using Homebrew. However, whenever I type the command mysql I receive this error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I suspect this is a permission problem, as I have confirmed my system is looking for MySQL in the right location. However, I a novice with Unix(OSX) and don't know how to rectify the problem.

I am using O开发者_运维百科SX 10.7 (Lion)

which mysql produces /usr/local/bin/mysql


When you type 'mysql' you are running the MySQL client. The client needs to communicate with the server. If you simply run 'mysql' without any argument it assumes you are trying to connect to a mysql server that is located on 'localhost' using the user name as the user you are running the command as and without a password.

From the error it seems your server is not running yet. Start it by typing: mysql.server start

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜