0

I'm trying to create table onto a MySQL Database, but when I click the button to perform, I'm getting the following error on GUI;

com.mysql.jdbc.exception.jdbc4.CommunicationsException: Communications link failure

The last packet sent succesfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Why does this error occur?

Full code on Pastebin; http://pastebin.com/NEic9iP4

Community
  • 1
  • 1
SoftwareEnthusiast
  • 271
  • 2
  • 9
  • 26

1 Answers1

0

Your problem is this line:

url = "dbc:mysql://buiud.com:3306/buiud458_androidhive";

Change it to :

url = "jdbc:mysql://buiud.com:3306/buiud458_androidhive";

The error also comes when the Mysql service is not up. But for you I think the error is in your URL

Stanley Mungai
  • 4,044
  • 30
  • 100
  • 168