Mysql remote connection
Posted chuiyuan
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql remote connection相关的知识,希望对你有一定的参考价值。
1.修改mysql 配置文件
在/etc/mysql/my.cnf中,注释掉
skip-external-locking
bind-address = 127.0.0.1
2.重启mysql
sudo /etc/init.d/mysql restart
这时如果运行
sudo lsof -i -P | grep 3306
可以看到下面的内容:
mysqld 21581 mysql 13u IPv6 3586629 0t0 TCP *:3306 (LISTEN)
此时已经可以连接到远程数据库了。如果说还有问题,可以接着做下面的步骤。
以上是关于Mysql remote connection的主要内容,如果未能解决你的问题,请参考以下文章
配置远程连接mysql数据库 Connect to remote mysql database
sftp修改用户home目录后登录时报connection closed by remote host
Mysql错误Unable to connect to remote host. Catalog download has failed.
MySQL笔记: 启动弹窗问题,unable to connect to remote host. catalog download has failed.
ssh 连接不上报Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host