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" );
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
I'm guessing it a permissions problem in MySQL. It needs to know the machine from which you connect in addition to credentials.
精彩评论