Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Novice query....

 
Tom Bevan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic