Project

General

Profile

task #8118

Update MySQL drivers

Added by Andreas Müller 10 months ago. Updated 26 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.


Related issues

Related to Edit - bug #8343: potential timezone problem in application stack Feedback 06/27/2019

Associated revisions

Revision b137f4e3 (diff)
Added by Andreas Müller 10 months ago

ref #8118 drivers for MySQL updated and MariaDB added

Revision c60cae60 (diff)
Added by Andreas Müller 10 months ago

ref #8118 fix compile error in SequenceTableCreator

Revision 7920febf (diff)
Added by Andreas Müller 10 months ago

ref #8118 added MariaDbDatabaseType

Revision 3e6b02bb (diff)
Added by Patrick Plitzner 10 months ago

ref #8118 Update mysqlconnector dependency

Revision 168c2abf (diff)
Added by Patrick Plitzner 10 months ago

ref #8118 Update/remove mysqlconnector dependency

Revision 48fcf86f (diff)
Added by Patrick Plitzner 10 months ago

ref #8118 Remove outdated mysqlconnector dependency

Revision 9a02c3fb (diff)
Added by Andreas Müller 10 months ago

ref #8118 fix DatabaseTypeEnumTest

Revision e443ff93 (diff)
Added by Andreas Müller 10 months ago

ref #8118 update mysql driver package string

Revision 45fd6fd3 (diff)
Added by Andreas Müller 10 months ago

ref #8118 update mysql driver path in code and tests

Revision c383fa9c (diff)
Added by Andreas Müller 8 months ago

ref #8118 drivers for MySQL updated and MariaDB added

Revision 13724b0c (diff)
Added by Andreas Müller 8 months ago

ref #8118 fix compile error in SequenceTableCreator

Revision cb620033 (diff)
Added by Andreas Müller 8 months ago

ref #8118 added MariaDbDatabaseType

Revision 520123a5 (diff)
Added by Andreas Müller 8 months ago

ref #8118 fix DatabaseTypeEnumTest

Revision de89e527 (diff)
Added by Andreas Müller 8 months ago

ref #8118 update mysql driver package string

Revision 8f96afd0 (diff)
Added by Andreas Müller 8 months ago

ref #8118 update mysql driver path in code and tests

History

#1 Updated by Andreas Müller 10 months 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 10 months ago

compile error fixed

#3 Updated by Andreas Müller 10 months ago

  • Status changed from In Progress to Resolved

#4 Updated by Andreas Kohlbecker 10 months 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 10 months 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 10 months 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 9 months 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 9 months 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 9 months 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 9 months 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 9 months ago

  • Assignee changed from Katja Luther to Andreas Müller

#13 Updated by Andreas Müller 8 months ago

  • Target version changed from Release 5.6 to Release 5.7

We should create a Wiki page for this information. Move to new milestone as this is not release critical.

#14 Updated by Andreas Kohlbecker 8 months ago

how to information added to MySqlFaq

#15 Updated by Andreas Müller 8 months ago

  • Target version changed from Release 5.7 to Release 5.8

#17 Updated by Andreas Kohlbecker 6 months ago

The proper solution it the timezone problem is documented at MySqlFaq#The-server-time-zone-value-is-unrecognized

#18 Updated by Andreas Müller 5 months ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

Andreas Kohlbecker wrote:

The proper solution it the timezone problem is documented at MySqlFaq#The-server-time-zone-value-is-unrecognized

can you please provide a link? I can't find it on mysql FAQ e.g. https://www.mysql.com/de/about/faq/ or on the mysql manual reference page

#19 Updated by Andreas Müller 5 months ago

  • Related to bug #8343: potential timezone problem in application stack added

#20 Updated by Andreas Müller 5 months ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

#21 Updated by Andreas Müller 4 months ago

  • Target version changed from Release 5.8 to Release 5.10

#22 Updated by Andreas Müller 3 months ago

  • Target version changed from Release 5.10 to Release 5.11

#23 Updated by Andreas Müller about 1 month ago

  • Target version changed from Release 5.11 to Release 5.12

#24 Updated by Andreas Müller 26 days ago

  • Target version changed from Release 5.12 to Release 5.13

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)