LibreOffice Base and MySQL-server connection problem solved for Ubuntu-Mate 18.04


#1

Hello

I set up a MySQL-server on my localhost and connected MySQL Workbench to it. For details of my connection difficulties and solution see:

I imported my old database onto the MySQL Server and wanted to connect my existing front-end LibreOffice Base to it.

Using the "MySQL-JDBC" connector I could not make the connection - the following error message appeared:

"SQL Status: 01S00 (this code stands for Invalid connection string attribute). The server time zone value 'CEST' 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.

I found that user GordR had solved the problem on Stackoverflow.com:
https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue

I was having the exact same problem as GordR in LibreOffice Base. He solved the connection problem by specifying a non 'daylight savings time zone' in the connection string.

This solution works for my "MySQL via JDBC" connection between my LO Base front-end and my MySQL server running on localhost.

SOLUTION
1)
Make sure your MySQL server is running.

In LibreOffice Base (assuming you have an existing "front-end")

Navigate via the menus Edit > Database > Properties... to the "Database Properties" window.

On the "Advanced Properties" tab enter into the field "Name of the MySQL Database" the following:

MyDBName?autoReconnect=true&useLegacyDatetimeCode=false&serverTimezone=MST

Replace "MyDBName" with the name of the database on your server that you wish to connect to.

If you are setting up the connection for the first time i.e. you are creating a new "front-end" just enter the information given in (2) above at the appropriate stage of the "set up a connection to an existing database" dialogue.

Also of interest...
GordR tried without the "&serverTimezone=MST" but that failed. He also tried "&serverTimezone=MDT" and that failed too. He concluded that, for some reason, it doesn't like daylight savings time.

I hope this helps those who share this problem. :slight_smile: