MySQL Connector returning “Communication Link Failure”Solving a “communications link failure” with JDBC and MySQLHow to avoid SQLException?How to insert a line in my DB using those lines of command, and it doesnt workException in thread “AWT-EventQueue-0” Java Errorhow to run executable via processBuilder?NullPointerException with ComboBoxjpl library won't work with java maven projecthow to resolve the NullPointerException error in the following code? Throws error for setting text int TextFieldapache POI java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFileError in display database and calculate the salary in Java AWTHaving a Null pointer exception while coding my first GUI and I can't figure out where it's going wrong

Why different specifications for telescopes and binoculars?

How effective would wooden scale armor be in a medieval setting?

When I press the space bar it deletes the letters in front of it

Should I include code in my research paper?

"was fiction" vs "were fictions"

LED glows slightly during soldering

Stacked light circle effect in Photoshop?

Why did Old English lose both thorn and eth?

How quality assurance engineers test calculations?

What minifigure is this?

How do you move up one folder in Finder?

Yet another hash table in C

Do I have to worry about delays in international trains? (UK, Belgium, Germany)

When did "&" stop being taught alongside the alphabet?

Can Jimmy hang on his rope?

Addressing unnecessary daily meetings with manager?

Reverse dots and boxes

pattern recognition riddle

Why is the ladder of the LM always in the dark side of the LM?

Chrysanthemum bejeweled with dew drops

Is it possible to split a vertex?

The origin of a particular self-reference paradox

Misspelling my name on my mathematical publications

Is there any reason why MCU changed the Snap to Blip



MySQL Connector returning “Communication Link Failure”


Solving a “communications link failure” with JDBC and MySQLHow to avoid SQLException?How to insert a line in my DB using those lines of command, and it doesnt workException in thread “AWT-EventQueue-0” Java Errorhow to run executable via processBuilder?NullPointerException with ComboBoxjpl library won't work with java maven projecthow to resolve the NullPointerException error in the following code? Throws error for setting text int TextFieldapache POI java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFileError in display database and calculate the salary in Java AWTHaving a Null pointer exception while coding my first GUI and I can't figure out where it's going wrong






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have been trying to connect my program to a non localhost database since it will be used on other computer but I keep getting a Communications Link Failure.



This is the Error I'm getting:



Communications link failure
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at ContactList.SignUp.jLabelCreateMouseClicked(SignUp.java:456)
at ContactList.SignUp.access$1300(SignUp.java:16)
at ContactList.SignUp$8.mouseClicked(SignUp.java:164)
at java.awt.Component.processMouseEvent(Component.java:6536)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


The code works completely fine when I use localhost with XAMPP. Could it be a restriction by OVH or some setting in MySQL.
The MySQL is on Linux Ubuntu VPS.
Here is the code for the connection.



import java.sql.Connection;
import java.sql.DriverManager;

public class myConnection
// Init Database Constants
private static final String DATABASE_DRIVER = "com.mysql.jdbc.Driver";
private static final String DATABASE_URL = "jdbc:mysql://54.39.145.0:3306/contact";
private static final String USERNAME = "turtle";
private static final String PASSWORD = "ILikeTurtles321!";
private static final String MAX_POOL = "250";

// Init Connection Object
private Connection con;

// Connect Database
public static Connection getConnection()
Connection con = null;
try
Class.forName(DATABASE_DRIVER);
con = DriverManager.getConnection(DATABASE_URL, USERNAME, PASSWORD);
catch (Exception ex)
System.out.println(ex.getMessage());

return con;











share|improve this question






















  • Have you read this? stackoverflow.com/questions/6865538/…

    – Fellipe Sanches
    Mar 26 at 0:17











  • Yes I have read that.

    – JustStanix
    Mar 26 at 0:28











  • What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

    – skomisa
    Mar 26 at 3:27

















1















I have been trying to connect my program to a non localhost database since it will be used on other computer but I keep getting a Communications Link Failure.



This is the Error I'm getting:



Communications link failure
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at ContactList.SignUp.jLabelCreateMouseClicked(SignUp.java:456)
at ContactList.SignUp.access$1300(SignUp.java:16)
at ContactList.SignUp$8.mouseClicked(SignUp.java:164)
at java.awt.Component.processMouseEvent(Component.java:6536)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


The code works completely fine when I use localhost with XAMPP. Could it be a restriction by OVH or some setting in MySQL.
The MySQL is on Linux Ubuntu VPS.
Here is the code for the connection.



import java.sql.Connection;
import java.sql.DriverManager;

public class myConnection
// Init Database Constants
private static final String DATABASE_DRIVER = "com.mysql.jdbc.Driver";
private static final String DATABASE_URL = "jdbc:mysql://54.39.145.0:3306/contact";
private static final String USERNAME = "turtle";
private static final String PASSWORD = "ILikeTurtles321!";
private static final String MAX_POOL = "250";

// Init Connection Object
private Connection con;

// Connect Database
public static Connection getConnection()
Connection con = null;
try
Class.forName(DATABASE_DRIVER);
con = DriverManager.getConnection(DATABASE_URL, USERNAME, PASSWORD);
catch (Exception ex)
System.out.println(ex.getMessage());

return con;











share|improve this question






















  • Have you read this? stackoverflow.com/questions/6865538/…

    – Fellipe Sanches
    Mar 26 at 0:17











  • Yes I have read that.

    – JustStanix
    Mar 26 at 0:28











  • What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

    – skomisa
    Mar 26 at 3:27













1












1








1








I have been trying to connect my program to a non localhost database since it will be used on other computer but I keep getting a Communications Link Failure.



This is the Error I'm getting:



Communications link failure
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at ContactList.SignUp.jLabelCreateMouseClicked(SignUp.java:456)
at ContactList.SignUp.access$1300(SignUp.java:16)
at ContactList.SignUp$8.mouseClicked(SignUp.java:164)
at java.awt.Component.processMouseEvent(Component.java:6536)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


The code works completely fine when I use localhost with XAMPP. Could it be a restriction by OVH or some setting in MySQL.
The MySQL is on Linux Ubuntu VPS.
Here is the code for the connection.



import java.sql.Connection;
import java.sql.DriverManager;

public class myConnection
// Init Database Constants
private static final String DATABASE_DRIVER = "com.mysql.jdbc.Driver";
private static final String DATABASE_URL = "jdbc:mysql://54.39.145.0:3306/contact";
private static final String USERNAME = "turtle";
private static final String PASSWORD = "ILikeTurtles321!";
private static final String MAX_POOL = "250";

// Init Connection Object
private Connection con;

// Connect Database
public static Connection getConnection()
Connection con = null;
try
Class.forName(DATABASE_DRIVER);
con = DriverManager.getConnection(DATABASE_URL, USERNAME, PASSWORD);
catch (Exception ex)
System.out.println(ex.getMessage());

return con;











share|improve this question














I have been trying to connect my program to a non localhost database since it will be used on other computer but I keep getting a Communications Link Failure.



This is the Error I'm getting:



Communications link failure
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at ContactList.SignUp.jLabelCreateMouseClicked(SignUp.java:456)
at ContactList.SignUp.access$1300(SignUp.java:16)
at ContactList.SignUp$8.mouseClicked(SignUp.java:164)
at java.awt.Component.processMouseEvent(Component.java:6536)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


The code works completely fine when I use localhost with XAMPP. Could it be a restriction by OVH or some setting in MySQL.
The MySQL is on Linux Ubuntu VPS.
Here is the code for the connection.



import java.sql.Connection;
import java.sql.DriverManager;

public class myConnection
// Init Database Constants
private static final String DATABASE_DRIVER = "com.mysql.jdbc.Driver";
private static final String DATABASE_URL = "jdbc:mysql://54.39.145.0:3306/contact";
private static final String USERNAME = "turtle";
private static final String PASSWORD = "ILikeTurtles321!";
private static final String MAX_POOL = "250";

// Init Connection Object
private Connection con;

// Connect Database
public static Connection getConnection()
Connection con = null;
try
Class.forName(DATABASE_DRIVER);
con = DriverManager.getConnection(DATABASE_URL, USERNAME, PASSWORD);
catch (Exception ex)
System.out.println(ex.getMessage());

return con;








java mysql netbeans phpmyadmin connector






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 0:13









JustStanixJustStanix

63 bronze badges




63 bronze badges












  • Have you read this? stackoverflow.com/questions/6865538/…

    – Fellipe Sanches
    Mar 26 at 0:17











  • Yes I have read that.

    – JustStanix
    Mar 26 at 0:28











  • What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

    – skomisa
    Mar 26 at 3:27

















  • Have you read this? stackoverflow.com/questions/6865538/…

    – Fellipe Sanches
    Mar 26 at 0:17











  • Yes I have read that.

    – JustStanix
    Mar 26 at 0:28











  • What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

    – skomisa
    Mar 26 at 3:27
















Have you read this? stackoverflow.com/questions/6865538/…

– Fellipe Sanches
Mar 26 at 0:17





Have you read this? stackoverflow.com/questions/6865538/…

– Fellipe Sanches
Mar 26 at 0:17













Yes I have read that.

– JustStanix
Mar 26 at 0:28





Yes I have read that.

– JustStanix
Mar 26 at 0:28













What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

– skomisa
Mar 26 at 3:27





What version of MySQL is running, and what version of the driver (Connector/J? ) are you using?

– skomisa
Mar 26 at 3:27












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348137%2fmysql-connector-returning-communication-link-failure%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348137%2fmysql-connector-returning-communication-link-failure%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현