# JDBC::error when connecting to local MySQL database

GROUPS:
 I will go right to the problem.I have a localhost (XAMPP) installed on my computer (Mac). With this installation follows a MySQL server, and I would like to connect to it. But here is what happens:Needs["DatabaseLink`"]conn1 = OpenSQLConnection[JDBC["MySQL(Connector/J)", "127.0.0.1"],  "Username" -> "root", "Password" -> ""]The result is get is:JDBC::error: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. >>$FailedI have checked the following:Verified root and password, matches those required by the MySQL server.Verified the server is up and running.Read the Documentation on the subject. http://reference.wolfram.com/mathematica/DatabaseLink/tutorial/DatabaseConnections.html#27756I am running out of ideas on what to do. This problem has always existed and I have never been able to solve it.I would be really greatful if someone miraculously know tips and tricks to get it up and running. Answer 6 months ago 3 Replies  Dillon Tracy 2 Votes Hi,That error is typical when the server does not exist or cannot be reached. Can you mention what other clients (MySQL Workbench etc.) have been able to connect?Also: if your server is running on a non-standard port (i.e. not 3306), you will have to specify it in the connection URL. The connection command would be something like this:OpenSQLConnection[JDBC["MySQL(Connector/J)","127.0.0.1:1234/mydatabase"], "Username" -> "username", "Password" -> "$Prompt"]... for port 1234 and database mydatabase.