300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > mysql连接不上远程数据库_Mysql 连接不上远程数据库 求助

mysql连接不上远程数据库_Mysql 连接不上远程数据库 求助

时间:2019-06-01 06:48:53

相关推荐

mysql连接不上远程数据库_Mysql 连接不上远程数据库 求助

如题,放假在家玩树莓派集群,其中一台连不上数据库,今日怪事+1

=============================================================================

状态描述:

平台树莓派 4B,架构 armv7,系统 raspbian 最新( debian10 )

数据库版本 mariadb-server version: 10.3.22

安装 mariadb-server & client 后,

本地 mysql ( client ) 、以及 pypmyadmin可以连接数据库,工作正常。

远程连接( navicat 等)不能连接数据库,提示

>> mysql -h192.168.0.109 -uroot

ERROR 2002 (HY000): Can't connect to MySQL server on '192.168.0.106' (10061)

=============================================================================

配置方面,

/etc/mysql/f 中设置了绑定任意

[mysqld]

bind-address=0.0.0.0

数据库方面,select user,host from mysql.user; 返回

+------+------+

| user | host |

+------+------+

| root | % |

+------+------+

网络方面,ifconfig 显示

wlan0: flags=4163 mtu 1500

inet 192.168.0.106 netmask 255.255.255.0 broadcast 192.168.0.255

inet6 fe80::aff7:f451:c78e:c4eb prefixlen 64 scopeid 0x20

ether dc:a6:32:10:7a:44 txqueuelen 1000 (Ethernet)

RX packets 123134 bytes 147417079 (140.5 MiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 49386 bytes 8702996 (8.2 MiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

远程连接能正确到达指定端口

C:\Windows\System32>tcping 192.168.0.106 3306

Probing 192.168.0.106:3306/tcp - Port is open - time=4.249ms

Probing 192.168.0.106:3306/tcp - Port is open - time=2.502ms

Probing 192.168.0.106:3306/tcp - Port is open - time=3.440ms

Probing 192.168.0.106:3306/tcp - Port is open - time=2.913ms

Ping statistics for 192.168.0.106:3306

4 probes sent.

4 successful, 0 failed. (0.00% fail)

Approximate trip times in milli-seconds:

Minimum = 2.502ms, Maximum = 4.249ms, Average = 3.276ms

感觉十分奇怪,第一次遇到这种情况,感觉配置和网络都没啥问题,不知道为啥连不上,求助。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。