更新时间:2022-12-02 14:41:47
如果您使用的是 ubuntu
,则必须使用以下步骤来避免此错误(如果没有启用复制):
If you are using ubuntu
, you have to use the following steps to avoid this error(if there is no replication enabled):
vim/etc/mysql/my.cnf
bind-address = 127.0.0.1
使用 # 符号更新
在第一步中,如果在my.cnf
文件中找不到bind-address
,请在/etc/mysql/mysql.conf中查找.d/mysqld.cnf
文件.
In Step 1, if you cannot find bind-address
in the my.cnf
file, look for it in /etc/mysql/mysql.conf.d/mysqld.cnf
file.
在启用 MySQL 复制的情况下更新
尝试在IP
上连接MySQL服务器,MySQL服务器绑定在'my.cnf而不是
localhost或127.0.0.1`中.
Try to connect MySQL server on IP
for which MySQL server is bind in 'my.cnfinstead of
localhost or 127.0.0.1`.