Connecting java to mysql via J/connector and ODBC

jpsietsma

New Member
Messages
9
Reaction score
0
Points
0
Any help would be appreciated on this one guys,

Ok, so I'm trying to connect a JAVA program (not javascript) to a mysql database, but every time I try to connect it returns with the error "could not connect to mysql server at mysql-stoli.x10hosting.com. I also tried it with just plain stoli.x10hosting.com, it returned the same error.

Could someone please shed some light on the situation?

Thanks!

Jimmy
 

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
I assume you're using the Java program on your own pc (From what I have read there's no Java on X10, at least it isn't listed here)? If so, you can't connect to the X10 MySQL, since remote MySQL access isn't available on free hosting.
 

jpsietsma

New Member
Messages
9
Reaction score
0
Points
0
Shouldn't I still be able to connect via the mysql OBDC connector though? It wouldn't matter if java was available on the server because it's not java that's communicating, it's communicating through the mysql connector. Nobody else has had this issue?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Are you saying that you have a java applet running on a webpage and that you want it to communcate with a mySQL database on x10hosting?
 

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
Shouldn't I still be able to connect via the mysql OBDC connector though? It wouldn't matter if java was available on the server because it's not java that's communicating, it's communicating through the mysql connector. Nobody else has had this issue?
It doesn't matter what is communicating, it matters from where it is communicating. If it isn't running on the server it won't be able to connect to the database, since only internal connections are allowed.

Are you saying that you have a java applet running on a webpage and that you want it to communcate with a mySQL database on x10hosting?
If it is a java applet, then you won't be able to communicate with the X10 db since applets are run client side, and therefore count as external programs, even if they are served on a page on the server. (It is dangerous to allow direct access of applets to a db anyway, you should use a layer in between. You could write something in php to interface from the applet to the db.)
 
Last edited:

jpsietsma

New Member
Messages
9
Reaction score
0
Points
0
Ohhh, I see. No it is not an applet, it's a seperate program. Yeah that is the same advice i got on IRC, to set up a php interface for the program to interact with. Thanks Everyone!
 
Top