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/my.cnf 中設置了綁定任意
[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
感覺十分奇怪,第一次遇到這種情況,感覺配置和網絡都沒啥問題,不知道為啥連不上,求助。
總結
以上是生活随笔為你收集整理的mysql连接不上远程数据库_Mysql 连接不上远程数据库,求助的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php+错误+处理,PHP 错误处理手记
- 下一篇: 各种说明方法的答题格式_初中语文阅读答题