Cannot find mysql.sock

前端 未结 14 1249
一向
一向 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条回答
  •  攒了一身酷
    2020-12-04 11:29

    I got the exact path using:

    netstat -ln | grep -o -m 1 -E '\S*mysqld?\.sock'
    

    Since this only returns the path and doesn't require any input you could potentially use it in a shell script.

    MySQL must be currently running on your machine for this to work. Works for MariaDB too.

提交回复
热议问题