aspose file tools*
The moose likes JDBC and the fly likes Problems about connecting MySQL from Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problems about connecting MySQL from Applet " Watch "Problems about connecting MySQL from Applet " New topic
Author

Problems about connecting MySQL from Applet

Shan Xue
Greenhorn

Joined: Oct 27, 2009
Posts: 2

Hi all,

I have tried many solutions, but I still have trouble on connecting MySQL from applet.

Project: online Morse code experiment system

Description: the system should allow Morse code listeners to set initial parameters, input what they hear and submit the results. The applet will modify the parameters according to Morse code listeners' grades.

Solution: Java, PHP, MySQL

Problems:

I do the project on my Macbook. I installed MAMP which means the web server and database server are on the same host. Database host name is 'localhost', port 3306. When I do the prototype test, my Macbook is also used as the client, which is to say server side and client side are actually on the same computer. Everything works.

Problem came up when I deployed the project to department's server, openSUSE + MySQL + Apache. Web server and database server are on the same host also. Database port 3306. Login and sign up still work via php, but for applet, user cannot 'submit' their test results. I think there must be the MySQL connection problem from applet. But cannot get it.

Code: whole applet is a little bit long, the connDB() is how I connect database


Shan Xue
Greenhorn

Joined: Oct 27, 2009
Posts: 2
forget one thing, I've put the jdbc driver on the same path with applet

Thank you very much for your time and help!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38873
    
  23
Well done sorting it out. And welcome to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems about connecting MySQL from Applet