liquibase SSL peer shut down incorrectly - mysql

I have a problem integrating liquibase maven execution with a mysql 5.7 database provided by azure as a Service.
the error log is:
Failed to execute goal org.liquibase:liquibase-maven-plugin:3.0.5:status (default-cli) on project — : Error setting up or running Liquibase: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 575 ms ago. Remote host closed connection during handshake: SSL peer shut down incorrectly.
this is the connection string I give to liquibase:
jdbc:mysql://server-name:3306/db-name?useSSL=true&requireSSL=false
Any suggestion?
I have just tryed to set -Dhttps.protocols=TLSv1.1,TLSv1.2
but nothing changed..

Fixed issue using version 8.0.12 of mysql unit connector and updating jdbc URL with useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC for the jdbc time zone parameter

mysql on azure uses by default the ssl security protocol

Related

mysql connection with sql developer

I try to create a mysql connection with sql developer on MAC.
I loaded the mysql driver.
I tried to create a connection
But I had the following error
Statut : échec -Echec du test : 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 resolved the issue by re installing the last version of mysql with the correct driver. Furthermore I had to execute the following mysql command
SET GLOBAL time_zone = '+8:00';

How to fix " [08S01] Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. "

I'm working on a PHP project using PhpStorm + DataGrip + MySQL + WAMP and since then was working normally with remote database with these configurations (see images):
but suddenly I'm getting this error:
[08S01] 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. java.net.ConnectException: Connection refused: connect
Could someone knows what can I do to solve this error?
I already tried to do what I found here (Solving a "communications link failure" with JDBC and MySQL) and that did not work yet.
I expect to connect again normally to my database.
Hi this error is because you are running a MySQL version 5 or 8.0 and later. And your server is configured to use the protocol of TLS 1.2. So, you need to enable TLS Protocols.
Open Datagrip
Go to Properties
Data Sources > Advanced
In enabledTLSProtocol set the value:
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
Test connection. And should work!
edit the JDBC url and append this query parameter &enabledTLSProtocols=TLSv1.2

fail to connect to MySQL using IntelliJ IDEA

I wanted to use Hibernate, so I created a MySQL datasource by database of IntelliJ IDEA. But I got a problem that "connection to MySQL" failed.
I did not change any default setting and just added "demo" as database name.
Here is the description of the problem returned by IntelliJ IDEA.
Connection to MySQL - demo#localhost failed.
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.
(4s)
Sorry but there is no further information about the problem.
I granted IntelliJ IDEA the permission to access Internet since I can download packages via Maven dependencies, so probably there is not any problem with my Internet.

Jira: Error connecting to database

I created a MySQL RDS instance at AWS(Amazon web services).When I tried to test connection(Database) during the "Jira" installation, I am facing the below issue:
Error connecting to database
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.
Connection timed out: connect
when I tried to connect through MySQL localhost I am facing the below issue:
Error connecting to database
Unknown system variable 'storage_engine'
Try to remove 'storage_engine' variable from db url in /var/atlassian/application-data/jira/dbconfig.xml.
New mysql does not support this parameter as it is default engine now.

Unable to connect MySQL on system start in Windows Server 2012 R2

I have a Windows service (using .NET framework 4.5) installed on a Windows 2012 R2 machine. I have MySQL connector 6.9.7 and MySQL 5.6.25
When my service is started I am getting following error.
Authentication to host 'xxx.xx.x.xx' for user 'yyyyy' using method 'mysql_native_password' failed with message: Reading from the stream has failed. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed. ---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
or sometimes:
Unable to connect to any of the specified MySQL hosts.
If I restart the service in a while all seems to work properly. Any idea what the problem is?
Migrating OP's solution from the question to an answer:
After further investigation we have found that our database version was 5.6.25. We have tried same connectivity with our old db 5.5.16 and we didn't face the same issue, so it looks like issue is the database itself. Our new database is installed on a Linux machine.