MySQL persist stopped working after upgrde

Tags: #<Tag:0x00007f616efcce30> #<Tag:0x00007f616efcccf0>

Hi,
I just upgraded my armbian including latest openhab2/stable,now 2.4.0-1

The problem is that now the OH2 is unable to connect to the mysql server, it looks that it’s not able to send user/pass

The configuration below was working before:

/etc/openhab2/services/mysql.cfg:

url=jdbc:mysql://192.168.8.10/OpenHAB
user=openhab
password=op3nh@b
reconnectCnt=10
waitTimeout=30000
localtime=true

The error now in the openhab.log is:
2018-12-23 22:02:10.299 [ERROR] [sql.internal.MysqlPersistenceService] - mySQL: Failed connecting to the SQL database using: driverClass=com.mysql.jdbc.Driver, url=jdbc:mysql://192.168.8.10/OpenHAB, user=openhab
java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) ~[230:org.openhab.persistence.mysql:1.13.0]

Someone with a clue what hapen?

Continuing the discussion from MySQL persist stopped working after upgrde:

Hello,

I had the same issue when I upgraded openhab to 2.4.0.
In my case I think the issue is related to the following update of the MySql connector:

I am running MySql server on a Qnap NAS, believe this is an older version.
What version of MySql server are you running ?

I have disabled this service meanwhile as I have not found any solution yet.

I have same issue. Running MySQL 5.1.49 on an old Synology NAS. Persistance just stopped working after upgrading to OpenHAB 2.4 :frowning:

I started getting two errors. First is:
“Host ‘openHABianPi.lan’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’”

When I run FLUSH HOSTS, another error comes:
java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

I have tried reinstalling binding and have checked user credentials several times.

Any ideas?

BR,
Rasmus

Hello Rasmus.

I also had the same symptoms. Tried to flush hosts without success.

My Qnap is running Mysql server version: 5.1.73.
I migrated my persistence using the jdbc binding:


This binding is still using the old jdbc connector [mysql-connector-java-5.1.39.jar].

I believe this is the best solution, or downgrade to the old binding.

Hello!
New to this forum.
Just wanted to let anyone know that I successfully made the JDBC connection to work by the solution Kskaret suggested.
I downgraded the JDBC connector to version 5.1.39.

I used this guide:
https://community.openhab.org/u/activate-account/fb0313c3629993ba0e5cc8fbb9b0ad89

simply use bundle:uninstall in the karaf console (bundle:list will tell you the ID of the binding).
Moved the downloaded jar file to addons (/usr/share/openhab2/addons), restarted rpi and the service was up.