File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Problem connecting eclipse to mysql database with hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problem connecting eclipse to mysql database with hibernate" Watch "Problem connecting eclipse to mysql database with hibernate" New topic
Author

Problem connecting eclipse to mysql database with hibernate

Ole Banole
Greenhorn

Joined: Apr 13, 2010
Posts: 2
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

Joined: Apr 13, 2010
Posts: 2
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)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem connecting eclipse to mysql database with hibernate
 
Similar Threads
Removing Eclipse Ganymede
connection of eclipse helios and mysql
my applet can't connect to database
applet Mysql connection
Error connecting on MySQL