Cannot find mysql.sock

前端 未结 14 1284
一向
一向 2020-12-04 11:20

I just had to re-install mysql and I am having a problem starting it up. It cannot find the socket (mysql.sock). The problem is that neither can I. In my Mac OS X 10.4 te

14条回答
  •  旧时难觅i
    2020-12-04 11:41

    (Q1) How can I find the socket file?

    The default location for the socket file is /tmp/mysql.sock, to find the socket file for your system use this.

    mysqladmin variables | grep socket
    

    If you have just installed MySql the mysql.sock file will not be created until the server is started. Use this command to start it.

    sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
    

    If prompted for a password you can pass the username root or other username like this. Terminal will prompt you for the password.

    mysqladmin --user root --password variables | grep socket
    

    (Q2) How can I refresh locate index

    Refresh the locate db with this command.

    sudo /usr/libexec/locate.updatedb
    

提交回复
热议问题