GLPI: Adding Timezones to MariaDB on Linux

To function correctly, GLPI 10 and GLPI 11 rely on the time zones (Timezones) of the database, here MariaDB.

By default, they are not loaded into the database; it is necessary to do this from the operating system.

To perform this operation, you will need the MariaDB root password.

Enter the following command:

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

Enter the MariaDB root account password.

Now, we need to give the GLPI database user the rights to access the time_zone_name table.

Connect to the MariaDB server:

sudo mariadb -p -u root

Enter the MariaDB root account password.

Switching to the MySQL database:

use mysql

Modify permissions:

GRANT SELECT ON mysql.time_zone_name to 'glpi'@'127.0.0.1';

The user ‘glpi’@’127.0.0.1 must be adapted to your environment.

Update permissions:

FLUSH PRIVILEGES;

Leaving the prompt mariadb.

In GLPI, check in the Configuration / General section that the Timezones are loaded.

Romain Drouche
System Architect | MCSE: Core Infrastructure
IT infrastructure expert with over 15 years of field experience. Currently a Systems and Networks Project Manager and Information Systems Security (ISS) expert, I use my expertise to ensure the reliability and security of technological environments.

Leave a Comment