Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)

后端 未结 30 2347
再見小時候
再見小時候 2020-11-22 04:23

I am having a big problem trying to connect to mysql. When I run:

/usr/local/mysql/bin/mysql start

I have the following error :

<         


        
30条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 04:34

    I had this socket error and it basically came down to the fact that MySQL was not running. If you run a fresh install, make sure that you install 1) the system package and 2) the panel installer (mysql.prefPane). The panel installer will allow you to goto your System Preferences and open MySQL, and then get an instance running.

    Note that, on a fresh install, I needed to reset my computer for the changes to properly take effect. Following a reboot, I got a new instance running and was able to open up a connection to localhost with no problem.

    Also of note, I apparently had previous versions of MySQL installed but had removed the panel, which makes it easy to get an instance of MySQL running for mac users.

    A good link for this process of reinstalling: http://www.coolestguyplanettech.com/how-to-install-php-mysql-apache-on-os-x-10-6/

提交回复
热议问题