0

I'm trying to insert CSV data into the MySQL table. But after adding 64 rows I get following error. I'm confused because 64 rows have added to the DB and it fails every time I try.

sql error, state:08S01
 message: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.

I'm using MySQL JDBC client in java and my MySQL parameters I have given like below.

private String dbUrl = "jdbc:mysql://0.0.0.0:3306/amasyn_db";
private String dbUser = "root";
private String dbPassword = "root1234";

There was some hacks given but none of these worked in MacOS.

Pramodya Mendis
  • 686
  • 8
  • 24
  • Details about the context are missing (mySQL configuration and the Java code). This also seems to be duplicating question: https://stackoverflow.com/questions/16459990/sql-error-0-sqlstate-08s01-communications-link-failure – Nowhere Man Apr 13 '20 at 21:41
  • Details about debugging `Communication Link failure` exception may be found here: http://mysqlblog.fivefarmers.com/2010/09/06/debugging-communication-link-failure-exceptions-in-connectorj/ – Nowhere Man Apr 13 '20 at 21:42
  • @AlexRudenko I cant find `/etc/mysql/my.cnf` file in my mac – Pramodya Mendis Apr 15 '20 at 04:28
  • Sorry, I've never been using Mac at all :) Some answer can be [found here](https://stackoverflow.com/questions/10757169/location-of-my-cnf-file-on-macos) – Nowhere Man Apr 15 '20 at 12:59

0 Answers0