error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' — Missing /var/run/mysqld/mysqld.sock

后端 未结 30 2617
日久生厌
日久生厌 2020-11-22 10:49

My problem started off with me not being able to log in as root any more on my mysql install. I was attempting to run mysql without passwords turned on... but whenever I

30条回答
  •  感动是毒
    2020-11-22 11:32

    Temporary Solution

    Maybe someone facing this problem. I am using Mysql Workbench on Ubuntu 14 and got this error.

    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
    

    Find your socket file by running sudo find / -type s, in my case it was /run/mysqld/mysqld.sock

    So, I just created a link to this file in tmp directory.

    sudo ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
    

提交回复
热议问题