Bonjour,
Je cherche à ouvrir mon port 3306 sur un serveur debian car je souhaite faire communiquer une base de données avec un programme en Java (avec hiberrnate). J'ai essayé 36 trucs avec iptables et compagnie, ça fait 3 heures que je suis dessus et je n'y arrive absolument pas. Pouvez vous me dire comment il faut faire pour proprement ouvrir le port.
Pour info voici ce qui s'affiche pour mon test d'ouverture
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 root@:~# nmap -p 3306 62.210.114.184 Starting Nmap 6.00 ( http://nmap.org ) at 2015-09-30 22:04 CEST Nmap scan report for mx.drexco-gyneco.fr (62.210.114.184) Host is up (0.000052s latency). PORT STATE SERVICE 3306/tcp closed mysql Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
L'erreur généré par hibernate :
La configuration iptables :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 ** END NESTED EXCEPTION ** Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2997) at com.mysql.jdbc.Connection.<init>(Connection.java:1555) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:55) ... 15 more
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 root@:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:mysql ACCEPT tcp -- anywhere anywhere tcp dpt:mysql Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
Partager