Maybe the question is duplicated, but I didn't find an answer on the other similar posts here in StackOverflow.
My question is simple : I have a java application on a computer A
, I have access to my localhost
server with this app using JDBC
:
con=DriverManager.getConnection("jdbc:mysql://127.0.0.1/applicationrh?zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=UTF-8&characterSetResults=UTF-8","root","");
the connection to my localhost database stand when I use 127.0.0.1
or localhost
in JDBC but I get an error when I use my computer IP.
con=DriverManager.getConnection("jdbc:mysql://192.168.1.173/applicationrh?zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=UTF-8&characterSetResults=UTF-8","root","");
Error :
error Could not create connection to database server. Attempted reconnect 3 times. Giving up.
I want to access to my localhost database on the computer 'A' from a computer 'B'on the same network, I modified the httpd.conf to allow access from others IPs and the connection stands when I type the computer A
IP on the computer 'B' navigator , but its the same problem with JDBC.
Edit 1 : I can't find the bind_address line on my.ini file to add more ips. I'am using wamp 3.1.0 and mysql 5.7.19
Edit 2 : By desactivating temporary my antivirus (avira) now i can access to my db from the computer 'A' by using the ip adress. still can't do this on the computer 'B'