3

I have an application with local DB, which is H2. But customer is using MySQL. There were some issues on customer side, so I decided to install and run an application against MySQL on local machine (MacOS). I am using java 9.

  1. Download MySQL
  2. Install
  3. Follow very easy how to from jetbrains

Current setup: enter image description here enter image description here

After click on "Test Connection" I am getting following error.

enter image description here

There is a lot of comments:

packet drops or badly configured Firewall/Switch

a lot of transaction

known bug - solution in maven dependency

But most of them are not in test connection, but in configuration. Also the connection for those guys works at least once or through another set of firewalls. None of the previous solutions fit my case.

I also try to restart MySQL with:

sudo service mysql restart

With the result:

service: command not found

Or just to check the status with:

sudo service mysql status

With the result:

service: command not found

I dont know if it is connected to my issue? Is db running "forever" or idea will run it only when I will run the app? Could anyone help with connection to db?

Beginner
  • 207
  • 3
  • 6
  • 12

3 Answers3

11

I simply changed the driver to Amazon Aurora MySQL despite having a simple mysql database on a VPS.

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Flavio Troia
  • 2,451
  • 1
  • 25
  • 27
7

I ran into similar error when trying have JetBean Datagrip and Pycharm to connect to mySQL server hosted by Amazon.

I am able to fix this issue by using an earlier version of my SQL driver.

For example:

enter image description here

kosist
  • 2,868
  • 2
  • 17
  • 30
RyanS
  • 71
  • 1
  • 2
0

I tried with no result. After all I restarted and it showed me error message with expired password (which was one from mysql, I never changed it). To change password I have to install MySQL workbench, change pass and now it works. Anyway thank you!

Beginner
  • 207
  • 3
  • 6
  • 12