The driver has not received any packets from the server. Everything worked fine with phpMyAdmin and other applications using PHP but Java applications wouldn’t connect: Exception in thread "main" : Cannot connect the database! at Main.main(Main.java:19) Caused by: .jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. It happened to me after updating Mac OS X to El Capitan and upgrading MacPorts to work with it. You may have problems connecting to MySQL from Java applications using Connector/J (the Java connector for MySQL) after upgrading/migrating MacPorts to a newer version. Fix “Communications link failure” in Java applications with MySQL
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |