• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems about connecting MySQL from Applet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done sorting it out. And welcome to JavaRanch
 
reply
    Bookmark Topic Watch Topic
  • New Topic