This section describes how to get an encrypted connection to a remote MySQL server with SSH. 本节介绍如何使用SSH获得到远程MySQL服务器的加密连接。The information was provided by David Carlson 该信息由David Carlson提供<dcarlson@mplcomm.com>
.<dcarlson@mplcomm.com>
。
Install an SSH client on your Windows machine. For a comparison of SSH clients, see http://en.wikipedia.org/wiki/Comparison_of_SSH_clients.在Windows计算机上安装SSH客户端。有关SSH客户端的比较,请参阅http://enwikipediaorg/wiki/Comparison_of_SSH_clients。
Start your Windows SSH client. Set 启动Windows SSH客户端。设置Host_Name =
. yourmysqlserver_URL_or_IP
Host_Name = yourmysqlserver_URL_or_IP
。Set 设置userid=
to log in to your server. your_userid
userid=your_userid
以登录到您的服务器。This 此userid
value might not be the same as the user name of your MySQL account.userid
值可能与MySQL帐户的用户名不同。
Set up port forwarding. 设置端口转发。Either do a remote forward (Set 执行远程转发(设置local_port: 3306
, remote_host:
, yourmysqlservername_or_ip
remote_port: 3306
) or a local forward (Set port: 3306
, host: localhost
, remote port: 3306
).local_port:3306
,remote_host:yourmysqlservername_or_ip
、remote_port:3606
)或本地转发(设置port: 3306
、host: localhost
、remote port: 3306
)。
Save everything, otherwise you must redo it the next time.保存所有内容,否则下次必须重做。
Log in to your server with the SSH session you just created.使用您刚才创建的SSH会话登录到您的服务器。
On your Windows machine, start some ODBC application (such as Access).在Windows计算机上,启动一些ODBC应用程序(如Access)。
Create a new file in Windows and link to MySQL using the ODBC driver the same way you normally do, except type in 在Windows中创建一个新文件,并使用ODBC驱动程序链接到MySQL,方法与通常相同,只是键入MySQL主机服务器的localhost
for the MySQL host server, not yourmysqlservername
.localhost
,而不是yourmysqlservername
。
At this point, you should have an ODBC connection to MySQL, encrypted using SSH.此时,您应该有一个到MySQL的ODBC连接,使用SSH加密。