First of all, I am new in programing, I grateful for your help.
when I try to connect from Netbeans with mysql using XAMPP-VM , the system give me this error:
Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
This are my lines of code from Netbeans (java) for connection:
try{
Connection cn = DriverManager.getConnection("jdbc:mysql://localhost:8080/bd_ins","root","");
}catch (SQLException e){
System.out.println(e.getMessage());
System.out.println(e.getErrorCode());
}
My operating System is OS X Capitan
In Netbeans I am using this driver: mysql-connector-java-5.1.46.jar
XAMPP-VM is working right because all services are on: Apache, MySql. When I put: http://localhost:8080/phpmyadmin/ in the browser, this works
Thanks for your help, I am stuck since 4 days