Project

General

Profile

task #8118

Update MySQL drivers

Added by Andreas Müller 28 days ago. Updated 3 days ago.

Status:
Feedback
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
02/21/2019
Due date:
% Done:

40%

Severity:
normal

Description

We are using old JDBC drivers for MySQL. ALso we do not have drivers for MariaDB. Should be added.

Associated revisions

Revision b137f4e3 (diff)
Added by Andreas Müller 28 days ago

ref #8118 drivers for MySQL updated and MariaDB added

Revision c60cae60 (diff)
Added by Andreas Müller 28 days ago

ref #8118 fix compile error in SequenceTableCreator

Revision 7920febf (diff)
Added by Andreas Müller 28 days ago

ref #8118 added MariaDbDatabaseType

Revision 3e6b02bb (diff)
Added by Patrick Plitzner 28 days ago

ref #8118 Update mysqlconnector dependency

Revision 168c2abf (diff)
Added by Patrick Plitzner 28 days ago

ref #8118 Update/remove mysqlconnector dependency

Revision 48fcf86f (diff)
Added by Patrick Plitzner 28 days ago

ref #8118 Remove outdated mysqlconnector dependency

Revision 9a02c3fb (diff)
Added by Andreas Müller 28 days ago

ref #8118 fix DatabaseTypeEnumTest

Revision e443ff93 (diff)
Added by Andreas Müller 24 days ago

ref #8118 update mysql driver package string

Revision 45fd6fd3 (diff)
Added by Andreas Müller 24 days ago

ref #8118 update mysql driver path in code and tests

History

#1 Updated by Andreas Müller 28 days ago

  • Status changed from New to In Progress
  • Priority changed from New to Highest

I added both drivers to cdmlib-db (b137f4e3)

#2 Updated by Andreas Müller 28 days ago

compile error fixed

#3 Updated by Andreas Müller 28 days ago

  • Status changed from In Progress to Resolved

#4 Updated by Andreas Kohlbecker 28 days ago

  • % Done changed from 0 to 40

I read through the change sets, all are looking as expected.

As next step we should run a test against a maria db server

#5 Updated by Andreas Müller 24 days ago

  • Status changed from Resolved to Feedback

Starting with MySQL JDBC Driver 5.1.33 serverTimezone needs to be explicitly defined in connection string or one may get problems with some DB configurations.

It seems to happen often on Windows (KL reported it and also it happend on PESIHPC)

#6 Updated by Andreas Kohlbecker 23 days ago

Andreas Müller wrote:

Starting with MySQL JDBC Driver 5.1.33 serverTimezone needs to be explicitly defined in connection string or one may get problems with some DB configurations.

It seems to happen often on Windows (KL reported it and also it happend on PESIHPC)

Can you please add a refrence to this information?

I would expect either c3p0 oder hibernate to properly deal with such DB specific configuration issues.

from skimming over https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html it rather seems to me that there is a server and a client timezone. The server timezone should be set by the server system the client timezone by c3p0 oder hibernate, this timezone should match the client system timezone and should not be hardcoded in mysql connect url parameters.

#8 Updated by Andreas Müller 15 days ago

This is what I currently get when connecting to MySQL on PESIHPC:

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Mitteleuropäische Zeit' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)

#9 Updated by Andreas Müller 15 days ago

  • Assignee changed from Andreas Müller to Katja Luther

Katja, I think you also had the problem localy. What did you do to fix it?

#10 Updated by Andreas Müller 15 days ago

Some solution is setting on command line e.g. for Central European time (CET):

mysql> SET GLOBAL time_zone = '+1:00' (tested, 'CET' does not work here)

or in my.ini

default-time-zone=CET (untestet)

or in connection string "&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=CET" (tested but dirty)

#11 Updated by Katja Luther 15 days ago

Andreas Müller wrote:

Some solution is setting on command line e.g. for Central European time (CET):

mysql> SET GLOBAL time_zone = '+1:00' (tested, 'CET' does not work here)

or in my.ini

default-time-zone=CET (untestet)

or in connection string "&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=CET" (tested but dirty)

First I tried the first solution, but after restart the mysql server the problem occurs again, now I tested the second solution and this worked as well (with default-time-zone='+00:00')

#12 Updated by Katja Luther 3 days ago

  • Assignee changed from Katja Luther to Andreas Müller

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)