Error connecting to database [Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)]

参照 http://*.com/questions/4448467/cant-connect-to-local-mysql-server-through-socket-var-lib-mysql-mysql-sock

Are you connecting to "localhost" or "127.0.0.1" ? I noticed that when you connect to "localhost" the socket connector is used, but when you connect to "127.0.0.1" the TCP/IP connector is used. You could try using "127.0.0.1" if the socket connector is not enabled/working.

把 localhost 换成 127.0.0.1 就好了, 奇怪了。。。

上一篇:利用ajax获取到的网页源码不能执行js代码


下一篇:Delphi 函数指针(函数可以当参数)