尝试连接远程sql Server时:
@H_301_2@$tsql -S localhost -U myuser
我有错误,像:
@H_301_2@locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20009 (severity 9): Unable to connect: Adaptive Server is unavailable or does not exist OS error 61,"Connection refused" There was a problem connecting to the server @H_301_2@Compile-time settings (established with the "configure" script) Version: freetds v0.91 freetds.conf directory: /usr/local/freetds/conf/freetds MS db-lib source compatibility: no Sybase binary compatibility: no Thread safety: yes iconv library: no TDS version: 5.0 iODBC: no unixodbc: no SSPI "trusted" logins: no Kerberos: no我为远程服务器创建了隧道,如:
@H_301_2@$ssh -L 1433:db_server:1433 user@mid_server这将本地端口1433转发到db_server.我测试了我的ssh隧道工作,因为我可以连接到数据库使用Navicat(localhost在1433).我可以在1433端口telnet localhost.