用户工具

站点工具


侧边栏

Hi,大家好,我叫尹佳冀。我是一个热爱太极的程序员!

导航

mysql_localhost_vs_127_0_0_1

进程通信的默认链接方式

localhost

默认方式是:socket,比如/tmp/mysql.sock。因为是文件通信,所以不经过网卡,不受防火墙规则的影响。

127.0.0.1

的默认方式是:端口,比如127.0.0.1:9000

常见错误

error (2002) Can't connect to ...

The error (2002) Can't connect to … normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

error (2003) Can't connect to MySQL server on 'server' (10061)

The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

常见错误 Can't connect to [local] MySQL server

How to Protect or Change the MySQL Unix Socket File

mysql_localhost_vs_127_0_0_1.txt · 最后更改: 2020/07/22 20:56 (外部编辑)