Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 73953
332
  • 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
 
Alas, poor Yorick, he knew this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic