• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Novice query....

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Excuse me if this sounds dumb, still learning this stuff...
I have happily been working on a web app connected to a mysql databse on my pc using Tomcat for a while. Now I've come to put it on a web server, I seem to be having connection problems to the database.
As I see it, this could be down to two things;
1) The driver is different to the one I used....
2) My code did not use user name and password in the connection, i.e,

I thought that as I wanted anyone to be able to access the database over the web, I would leave them off on the live server version too. But am I wrong, and do I need user and password parameters? And will this mean creating a login screen?
Can anyone help me with this?
Thanks muchly in advance,
Tom.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You never want to leave a database so unsecure as to not require a username and password. You don't, however, have to create a login page. Basically, your connection string with username and password can be hardcoded where you need it. This allows only your web app access to the database. So no one has to login, they just have to use your app to access the database.
As far as the driver, if you are deploying your web app, just include your driver in the WEB-INF/lib folder, and that is where your web app will look for the driver and all other jar files it might need. So you can use your own driver that way.
If you could be a little more specific about the errors you encountered as well as telling us what driver you are using we might be able to help a bit more.
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic