无法使用 ssh-tunnel 连接到 mySQL,但本地连接 wokr 良好

Can't connect to mySQL with ssh-tunnel, but local connection wokrs well

提问人:Юрий Глущенко 提问时间:11/13/2023 最后编辑:Юрий Глущенко 更新时间:11/13/2023 访问量:37

问:

我正在尝试使用 ssh-tunnel 连接到 mySQL,但使用 DBeaver 收到“用户'bitrix0'@'::1'(使用密码:YES)的访问被拒绝”I'。

但本地连接效果很好

[root@bitrixc2 ~]# mysql -u bitrix0 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 23597
Server version: 5.7.39-42 Percona Server (GPL), Release 42, Revision b0a7dc2da2e

Copyright (c) 2009-2022 Percona LLC and/or its affiliates
Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

用户列表:

mysql> SELECT user, host FROM mysql.user WHERE user LIKE 'user' OR host LIKE 'localhost';
+--------------------+-----------+
| user               | host      |
+--------------------+-----------+
| SQLAdmin           | localhost |
| bitrix0            | localhost |
| mysql.session      | localhost |
| mysql.sys          | localhost |
| root               | localhost |
+--------------------+-----------+
6 rows in set (0.00 sec)

mysql>

如何连接 ssh-tunnel?或者可能是 DBeaver 有特殊的连接选项? 我尝试用腻子和 DBeaver 制作 ssh-tunnel。两个变体都有相同的错误。

mysql dbeaver ssh-隧道

评论

1赞 Ron van der Heijden 11/13/2023
localhost是 IPv4,是 IPv6::1
0赞 Evans Kiptoo 11/13/2023
尝试从 Dbeaver 创建新连接
0赞 Юрий Глущенко 11/13/2023
感谢您的回答,那么我可以更改什么?我在 dbeaver 中没有看到任何类似 IPv6 的选项
0赞 Юрий Глущенко 11/13/2023
“尝试从 Dbeaver 创建一个新连接”它不起作用(

答: 暂无答案