Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Connecting to GoDaddy dB with Hibernate

Connecting to GoDaddy dB with Hibernate

Connecting to GoDaddy dB with Hibernate

I have created a Java web application that uses Hibernate to pull data from a MySQL database that is on my PC.  The app works correctly when I run it locally on a Tomcat server on my PC.  When I upload the WAR file to the GoDaddy server and use the database on the GoDaddy server I cannot pull data from the database--that is where I need help.  The database name, username, password, and database structure is identical on both my PC and the GoDaddy server.  I think the only difference would be the hostname; where do I make that change in my project?  Any help that can be provided would be great. Thanks.

RE: Connecting to GoDaddy dB with Hibernate

I bet the driver will be different too. How are you doing the connection?


RE: Connecting to GoDaddy dB with Hibernate

In my hibernate.cfg file these are a couple of my property elements. Does this answer your question?

<property name="connection.driver.class">com.mysql.jdbc.Driver</property>
<property name="connection.datasource">java:/comp/env/jdbc/MySQLDB</property>

RE: Connecting to GoDaddy dB with Hibernate

Oh, sorry, I thought goDaddy was a kind of database.

Is the DB hosted in goDaddy too? If so, you're right, you'll have to change the name of the host the program is connecting to.


RE: Connecting to GoDaddy dB with Hibernate

I know the name of the GoDaddy host but do you know where I am supposed to make the change in my code?  Besides the server.xml file, which is only used for running on my PC (I think), I do not know of any other files in my web app where I would make the hostname change.  Thanks for your continued help!

RE: Connecting to GoDaddy dB with Hibernate

Well, it's difficult to know without looking at the code. Maybe you harcoded the host name or maybe you externalized it to a properties file.


RE: Connecting to GoDaddy dB with Hibernate

Is there a sample JSP that I can use to test a database connection to the MySQL database that I have set up on the GoDaddy shared server?  I already know the GoDaddy hostname, database name, username, and password.  Thanks again for the help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close