File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem connecting eclipse to mysql database with hibernate

 
Ole Banole
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The title pretty much explains what my problem is. Details:

When I push the "Test Connection"-button I get "Ping failed!" and this error message:



In the properties under the tab "General" i have these settings:

Database: media
URL: jdbc:mysql://localhost:3306/
User name: root
Password: ******


The username and password is correct (tested in mysql command line) and the database exists (show database;)
Currently using mysql-connector-java-5.1.12.jar and hibernate3.
URL's I have also tried:
jdbc:mysql://localhost:3306/media
jdbc:mysql://localhost/
jdbc:mysql://localhost/media

I was told that MySQL automaticly hosts the localhost connections when installed (I've checked that the service is running), I hope this is correct.

I've been stuck with this for several hours and thinking it is time to ask for some help if any is available=p
Don't hesitate to ask if any more details are needed.

Btw, I'm using Windows 7 (I'm mentioning this cause I've experienced that OS's can be the cause of pretty much every problem out there)

Regards
 
Ole Banole
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it to work by running the MySQL server instance config wizard again. Was so long since I installed MySQL that I didn't know what options to choose back then x)
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic