Summary:
ERROR: Your MySQL TimeZone database is not populated.
Please populate this database before proceeding.
Problem or Goal:
I ran into this error while doing pre-installation checks for cacti installation on CentOS 8
Cause:
MySQL TimeZone database is not populated
Solution:
1. Make sure to first set the proper date and timezone on your server, to do this run the following commands:
//The command below lists all the valid timezones on your server
# timedatectl list-timezones
// The command below, sets the preferred timezone on your server
# timedatectl set-timezone Africa/Kampala
// You can use the "date" command to check and verify that the proper date and timezone have been set.
2. Edit /etc/php.ini file with the suggested setting showing in the installation script, this includes setting the timezone.
Note: (Make sure this line is not commented out "date.timezone", as it will be commented out by default, remember to un-comment it, otherwise it will generate for you another error like "date.timezone >= Error A valid timezone that matches MySQL and the system")
memory_limit = 800M
max_execution_time = 60
date.timezone = Africa/Kampala
3. Populate TimeZone table in MySQL database with the global TimeZone information, to achive this, run the following command, supply the root mysql password when prompted and hit enter.
# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
// You can use the command below to verify that the timzone information has been updated in your database.
# mysql -u root -p
Enter password:
mysql> use mysql;
mysql> show variables like '%time_zone%';
4. Now you need to grant access to the MySQL TimeZone database for user Cacti,
so that the database is populated with global TimeZone information, to do this run the following commands.
# mysql -u root -p
Enter password:
mysql> use mysql;
mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost;
mysql> flush privileges;
5. Restart services;
systemctl restart php-fpm.service
systemctl restart mariadb.service
systemctl restart httpd.service
Note: in some cases, it the error doesn't clear in the cacti installation script, you will need to restart the server to clear the system cache
Problem Solved?
Yes, i was able to continue through the cacti installation script and successfully deploy cacti on CentOS 8
No comments:
Post a Comment