• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems about connecting MySQL from Applet

 
Shan Xue
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done sorting it out. And welcome to JavaRanch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic