通过 SSH 隧道的 mysql [英] mysql over SSH tunnel

查看:86
本文介绍了通过 SSH 隧道的 mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 win7 开发机器和 windows 2008 生产服务器上都遇到了问题,通过 SSH 将远程 Suse Linux 服务器连接到 mysql.我已按照此处的非常简单的说明进行操作.

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

仅在最后一步,我尝试使用从这里下载的 odbc 连接器.

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/

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

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.

推荐答案

好的,我想通了...您必须以管理员身份运行 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.

这篇关于通过 SSH 隧道的 mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆