ashabasa ashabasa - 7 months ago 23
SQL Question

ping failed error in connection testing : MySQL

I'm trying to connect to a MySQL database using hibernate.

I'm testing the connection using this :

enter image description here

My wamp is installed on port number 80, my database name is hibernate_test, both my username and password are "ingenius".

I installed the mysql-connector-java-5.1.0-bin jar

I enabled remote Access to MySQL and WAMP Server by editing the c:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf file :

<Directory "c:/wamp/www/">
ExecCGI MultiViews
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>


and I keep getting the
ping failed
error. I don't know where I'm wrong !!! Please help!

Answer

change your jdbc url to

jdbc:mysql://localhost:3306/hibernate_test

and you should be through, as mysql's default port in 3306

Comments