简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM