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

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

    This doesn't directly answer your question but a subset of it, namely using PythonAnywhere. I kept stumbling upon this question when looking for a fix so I'm adding it here in the hope that it will help others in my situation.


    PythonAnywhere decided to change the database connection hostnames in order to improve efficiency and reliability, as detailed here:

    The official host name you should use for connecting to your account's MySQL database instance has changed from mysql.server to yourusername.mysql.pythonanywhere-services.com. This bypasses a part of our infrastructure that has started showing problems in recent weeks, and it should be much more efficient and reliable than the old way.

    Hence, you will need to update your hostname to the value highlighted above.

提交回复
热议问题