MySQL Connect via proxy in Java -
i developing client-server software, client connects database server follows.
... try { class.forname("com.mysql.jdbc.driver"); connection conexion = drivermanager.getconnection("jdbc:mysql://localhost/agenda", "root", "la_password"); }catch.... ...
both applications on same local network. problem have when local network uses proxy, in case mysql connection fails.
how can make connection java programming language, mysql database when proxy on local network?.
thanks help. greetings!
try using socksproxyhost
, socksproxyport
system properties. here @ chapter "2.4) socks" , here. (the http.proxyhost not work jdbc.) here description of use proxy jdbc (oracle example): connect outside internet oracle database inside intranet through jdbc. may want use properties: socksproxyset, socksproxyport, socksproxyhost, java.net.socks.username, java.net.socks.password
. here description how set version, username , password. , ofc you need socks proxy, not http.
if have http proxy can try tunnel jdbc through http. there few solutions. example here free solution http://sourceforge.net/projects/sqlgateway/ , here commercial http://www.idssoftware.com/jdbcdrv.html
Comments
Post a Comment