I'm trying to connect my Java program to my server but I can't. I don't want to use a localhost.
Asked
Active
Viewed 55 times
-2
-
add some code maybe? explain what fails? – gidim Oct 27 '15 at 04:34
-
share your code will help you? – soorapadman Oct 27 '15 at 04:36
-
1What on earth does HTTP have to do with it? – user207421 Oct 27 '15 at 20:43
-
Are you using jdbc or what api are you using to connect to MySQL, could you please elaborate or provide a snippet on how you are connecting . – user155806 Oct 27 '15 at 05:35
1 Answers
0
Use the hostname of the mysql server in the connection string instead of using localhost. Make sure port 3306 is open on the mysql machine. If you don't have a hostname use the IP address as a lassssst resort. E.g.
192.168.1.20:3306
http://dev.mysql.com/doc/connector-j/en/connector-j-installing.html

Bob
- 780
- 9
- 10