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

后端 未结 30 2308
再見小時候
再見小時候 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:54

    For those whose any solution did not work, try:

    cd /etc/mysql
    

    check if my.cnf is present

    nano my.cnf
    

    and make sure you have only one bind-address as follows:

    bind-address = 127.0.0.1

    If not, that might be the problem, just exit nano and save the file.

    and service mysql start

    note that if you don't have nano (its a text editor) just install it with apt-get install nano and once in just press Ctrl+X to exit, dont forget to say Y to save and use the same file)

提交回复
热议问题