Help - Search - Members - Calendar
Full Version: Can U Connect To Db On Another Computer?
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
mythicwolf
I have this (just to test if you can connect/edit the db from another computer), and its always a timeout error. its written in java, and I'm pretty sure all of the syntax is correct, I just don't know if you are allowed to connect from another computer.

CODE
try{
Class d = Class.forName("com.mysql.jdbc.Driver");

String url = "jdbc:mysql://hosting.zymic.com/mythicwolf_zxq_net_firsttest";
String username = "mythicwolf_zxq_net_mythicwolf";
String pass = "mypass"; //not my real pass tongue.gif
Connection dbcon = DriverManager.getConnection(url, username, pass);

String stmt = "create table hs ( int y, int z, int n, primary key (n) ); ";
Statement pst = dbcon.createStatement();
pst.execute(stmt);

for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 4; j++)
{
for(int f = 0; f < 4; j++)
{
String atb = "insert into hs values ("+f+", "+j+", "+i+")";
pst.addBatch(atb);
}
}
}
pst.executeBatch();

}catch(Exception e){
e.printStackTrace();
}


so, is there any way to connect to your zymic database without having the program ran on the zymic servers?
Andrew
I don't have an answer for this but I really doubt they would let that happen. They have outgoing connections blocked for http so why would they allow incoming connections on their sql server?

Either way I don't know if your just trying to make a test, but you can install a WAMP server on your computer and maybe a buddies and then test your script that way.
Ed
Trippin7464 is correct, incoming mysql connections are dropped. An alternative to installing mysql localhost is using http://freesql.org
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.