DBeaver 无法连接mysql可能的两种情况:
- mysql user 没有远程连接权限。
mysql> use mysql;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> select user,host from user;+---------------+-----------+| user | host |+---------------+-----------+| mysql.session | localhost || mysql.sys | localhost || root | localhost |+---------------+-----------+3 rows in set (0.00 sec)# 修改远程登录权限mysql> update user set host = '%' where user = 'root';Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> select user,host from user;+---------------+-----------+| user | host |+---------------+-----------+| root | % || mysql.session | localhost || mysql.sys | localhost |+---------------+-----------+3 rows in set (0.00 sec)# 刷新mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
- 防火墙导致端口无法访问,可以使用 telenet 试试,然后做防火墙设置
来源地址:https://blog.csdn.net/sinat_31830179/article/details/129681806