通过 SSH 隧道的 mysql

发布于 2025-01-05 08:49:09 字数 760 浏览 5 评论 0原文

我在 win7 开发机器和 Windows 2008 生产服务器上通过 SSH 连接远程 Suse Linux 服务器到 mysql 时遇到问题。我遵循了这里非常简单的说明。

http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html

仅在最后一步,我'我尝试使用从此处下载的 odbc 连接器。

http://dev.mysql.com/downloads/connector/odbc/

尝试两者localhost:3306 和 127.0.0.1:3306 似乎没有什么区别。我可以通过 ssh 在 putty 中登录 Linux 服务器,并使用终端的命令行连接到 mysql。我的问题是我需要Windows服务器能够连接Linux服务器上的mysql实例并查询数据。当我尝试从 odbc 连接器进行连接时,它立即弹出一条错误,提示 root@localhost 被密码=YES 拒绝。我检查了 mysql 中的用户表,并将 root 设置为允许从任何主机(包括本地主机)登录。任何人对于让它发挥作用还有其他建议吗?这非常紧急,因为我们需要计划在本周六之前同步几场演出的数据。预先感谢您的任何帮助。

I'm having an issue on both a win7 development machine, and on a windows 2008 production server with connecting to a remote Suse Linux server to mysql over SSH. I've followed the very simple instructions here.

http://realprogrammers.com/how_to/set_up_an_ssh_tunnel_with_putty.html

only on the last step, i'm trying to use the odbc connector that I downloaded from here.

http://dev.mysql.com/downloads/connector/odbc/

trying both localhost:3306 and 127.0.0.1:3306 doesn't seem to make a difference. I CAN log into the linux server in putty over ssh, and use the command line from the terminal to connect to mysql. My issue is that I need the windows server to be able to connect and query data from the mysql instance on the linux server. When I attempt to connect from the odbc connector it immediately pops up an error that root@localhost is denied with password=YES. I've checked my user table in mysql and root is set to allow login from any host, including localhost. Anyone have any other suggestions for getting this to work? It's quite urgent as we need to plan for a data synchronization of several gigs by this Saturday. Thanks in advance for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

昔梦 2025-01-12 08:49:09

好吧,我明白了......你必须以管理员身份运行 putty.exe。一旦我这样做了,连接就工作得很好。希望这可以节省人们几个小时的工作时间。感谢 bfavaretto 的帮助。

Okay, I figured this out... You have to run putty.exe as an administrator. Once I did that the connection worked just fine. Hopefully this saves someone a few hours of work down the road. Thanks to bfavaretto for his help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文