In JDBC, when I put
localhost for the url to get a connection, it works perfectly fine; I can connect to the database. However, I want other programs to be able to connect. So I tried using my IP address but that doesn't work. I already granted access to other IP addresses but it still won't connect in the Java application. What should be done to establish the connection?
Best How To :
Make sure it is not the MySQL bind-address problem. The parameter for bind-address in my.cnf of MySQL MySQL bind-address parameter
You will need to comment out the bind-address parameter to make sure you can connect to any of the available IP addresses. It can be one or all, it can not be multiple IP address value for this parameter.
On command line checking for which port your MySQL is listening to may help as well.
netstat -tlpn | grep mysql