mysql代理袜子 [英] mysql proxy socks

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

问题描述

简单明了,谁能解释我如何通过代理连接到mysql服务器(socks4/5).最好通过mysql命令行(尽管客户端中没有此选项).

Plain and simple, can anyone explain me how to connect to a mysql server through a proxy (socks4/5). Preferable via the mysql command line (although there are no options for that in the client).

如果无法通过mysql命令行使用其他方法,则无法使用.

If it's not possible through the mysql command line than ANY other method will work.

推荐答案

据我所知,由于mysql命令不支持代理连接,因此无法通过命令行完成.

To my knowledge, it can't be done through the command line because the mysql command does not support proxy connections.

如果客户端和服务器都在UNIX计算机上,并且可以从外部访问其中之一,则建议使用SSH隧道.基本上,这是一个安全的隧道TCP连接,可以用于任何事物,并且本地mysql命令可以轻松地连接到隧道端口.

If both client and server are on a UNIX machine and one of them is accessible from the outside, I suggest using an SSH tunnel. It's basically a securely tunneled TCP connection that can be used for anything and the local mysql command can connect to the tunnel port easily.

如果没有选择,则可以编写某种包装可执行文件.例如,Java和Ruby具有使您能够与SOCKS代理通信并将这些套接字与MySQL或JDBC协议实现挂钩的库.然后发生的事情完全取决于您接下来的计划.

If that's no option, you could write some kind of wrapper executable. For example, Java and Ruby have libraries that enable you to talk to SOCKS proxies and hook those sockets up to a MySQL or JDBC protocol implementation. What happens then depends entirely on what you have planned next.

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

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