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

后端 未结 30 2154
日久生厌
日久生厌 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:30

    My solution;

    Ubuntu 18.04 (WSL)

    /etc/mysql/my.cnf

    !includedir /etc/mysql/conf.d/
    !includedir /etc/mysql/mysql.conf.d/
    

    /etc/mysql/mysql.conf.d/mysqld.cnf

    [mysqld]
    user            = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    port            = 3306
    

    I changed the port. It's worked for me. You can write another port. Example 3355

提交回复
热议问题