Bonjour,
Eclipse Helios + JBoss Tools + Tomcat
Perspective JPA
Clic droit sur Database Connections / New... / MySQL / Next
Driver definition
- Driver type : MySQL JDBC Driver
- Jar : /home/philippe/tomcat/lib/mysql-connector-java-5.1.13-bin.jar
- Properties :
-- Connection URL : jdbc:mysql://localhost:3306/test
-- Database name : test
-- Driver Class : com.mysql.jdbc.Driver
-- Password : ****
-- User ID : root
Test connection :
==> Ping Failed !
Au boulot ça fonctionne sans problème.com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...
Caused by: java.net.ConnectException: Connexion refusée
at java.net.PlainSocketImpl.socketConnect(Native Method)
...
J'ai essayé de mettre le jar à différents endroits, de ne pas indiquer la BDD test dans l'URL de connexion... rien n'y fait.
Pourtant, avec phpMyAdmin et le même utilisateur et mot de passe, ça fonctionne !
Qu'est-ce qui manque ?
Partager