MySQL/MariaDB Time Zone Tables

Introduction

This article explains how to create the MySQL time zone tables if they do not exist and you receive a corresponding message from your Shopware application or similar. If you have a creoline server with the “Managed” support level, our customer support team will be happy to assist you. These instructions can also be used for servers with the Plesk Control Panel installed.


Prerequisites

  • MySQL or MariaDB server installed
  • Root access



MySQL Server


Log in to your server via SSH and run the following command:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql


Depending on the authentication method used for the root user, you may not need to specify the -p parameter for password-based authentication.


If you want to verify that the transfer was successful, you can use the following command:

mysql -u root -p -e "SELECT * FROM mysql.time_zone_name;"


For Plesk servers, you can also use the following command:

mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "SELECT * FROM mysql.time_zone_name;"


To apply the changes, you must restart the MySQL server:

systemctl restart mysql.service



MariaDB Server


Log in to your server via SSH and run the following command:

 mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb -u root mysql


Depending on the authentication method used for the root user, you may not need to specify the -p parameter for password-based authentication.


If you want to verify that the transfer was successful, you can use the following command:

mysql -u root -p -e "SELECT * FROM mysql.time_zone_name;"


For Plesk servers, you can also use the following command:

mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "SELECT * FROM mysql.time_zone_name;"


To apply the changes, you must then restart the MySQL server:

systemctl restart mariadb.service