Ulrik M
Ulrik M

Reputation: 163

Java Applet: JDBC-mysql work in eclipse but not in the browser

I have a weird problem. My java applet work fine in my IDE (Eclipse), no errors whatsoever. It still "work" when I run the applet in my browser, but it can't connect to my remote mysql database. Is there any reason as to why it wont connect to a remote mysql-database in the browser, while it will in Eclipse? Where are the error logs placed? Are there any good applet debugging tools?

connect = DriverManager.getConnection("jdbc:mysql://178.0.0.0:3306/database","username", >"password" );

Upvotes: 0

Views: 1057

Answers (2)

Kal
Kal

Reputation: 24910

Is your applet unsigned? There are security restrictions around applets that prevent them from connecting to servers other than the ones they were downloaded from.

http://download.oracle.com/javase/tutorial/deployment/applet/security.html

Upvotes: 3

duffymo
duffymo

Reputation: 308763

I'm guessing it a permissions problem in MySQL. It needs to know the machine from which you connect in addition to credentials.

Upvotes: 0

Related Questions