Project

General

Profile

Actions

task #8118

open

Update MySQL drivers

Added by Andreas Müller about 5 years ago. Updated about 2 years ago.

Status:
Feedback
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

40%

Estimated time:
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 stackClosedAndreas Müller

Actions
Related to EDIT - task #9972: Upgrade edit-integrationClosedAndreas Müller03/17/202203/25/2022

Actions
Actions #1

Updated by Andreas Müller about 5 years ago

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

I added both drivers to cdmlib-db (b137f4e3)

Actions #2

Updated by Andreas Müller about 5 years ago

compile error fixed

Actions #3

Updated by Andreas Müller about 5 years ago

  • Status changed from In Progress to Resolved
Actions #4

Updated by Andreas Kohlbecker about 5 years 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

Actions #5

Updated by Andreas Müller about 5 years 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)

Actions #6

Updated by Andreas Kohlbecker about 5 years 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.

Actions #8

Updated by Andreas Müller about 5 years 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)
Actions #9

Updated by Andreas Müller about 5 years 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?

Actions #10

Updated by Andreas Müller about 5 years 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)

Actions #11

Updated by Katja Luther about 5 years 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')

Actions #12

Updated by Katja Luther about 5 years ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #13

Updated by Andreas Müller almost 5 years 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.

Actions #14

Updated by Andreas Kohlbecker almost 5 years ago

how to information added to MySqlFaq

Actions #15

Updated by Andreas Müller almost 5 years ago

  • Target version changed from Release 5.7 to Release 5.8
Actions #17

Updated by Andreas Kohlbecker over 4 years ago

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

Actions #18

Updated by Andreas Müller over 4 years 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

Actions #19

Updated by Andreas Müller over 4 years ago

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

Updated by Andreas Müller over 4 years ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller
Actions #21

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.8 to Release 5.10
Actions #22

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.10 to Release 5.11
Actions #23

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.11 to Release 5.12
Actions #24

Updated by Andreas Müller over 4 years ago

  • Target version changed from Release 5.12 to Release 5.13
Actions #25

Updated by Andreas Müller about 4 years ago

  • Target version changed from Release 5.13 to Release 5.14
Actions #26

Updated by Andreas Müller almost 4 years ago

  • Target version changed from Release 5.14 to Release 5.15
Actions #27

Updated by Andreas Müller almost 4 years ago

  • Target version changed from Release 5.15 to Release 5.18
Actions #28

Updated by Andreas Müller over 3 years ago

  • Target version changed from Release 5.18 to Release 5.19
Actions #29

Updated by Andreas Müller over 3 years ago

  • Target version changed from Release 5.19 to Release 5.18
Actions #30

Updated by Andreas Müller over 3 years ago

  • Target version changed from Release 5.18 to Release 5.19
Actions #31

Updated by Andreas Müller about 3 years ago

  • Target version changed from Release 5.19 to Release 5.21
Actions #32

Updated by Andreas Müller about 3 years ago

  • Target version changed from Release 5.21 to Release 5.22
Actions #33

Updated by Andreas Müller almost 3 years ago

  • Target version changed from Release 5.22 to Release 5.45
Actions #34

Updated by Andreas Müller over 2 years ago

  • Priority changed from Highest to Priority14
Actions #35

Updated by Andreas Müller about 2 years ago

  • Target version changed from Release 5.45 to Release 5.46
Actions #36

Updated by Andreas Müller almost 2 years ago

  • Related to task #9972: Upgrade edit-integration added
Actions

Also available in: Atom PDF