Search My Techie Guy

Tuesday, September 26, 2017

ERROR: Your Cacti database login account does not have access to the MySQL TimeZone database.

Summary:

The following error was encountered during Cacti installation on RHEL or Oracle Linux Server 6.9


Problem or Goal: 
 ERROR: Your Cacti database login account does not have access to the MySQL TimeZone database. 
Please provide the Cacti database account "select" access to the "time_zone_name" table in the "mysql" database, 
and populate MySQL's TimeZone information before proceeding.

Cause:
Database user "cacti" does not have access to the TimeZone table "time_zone_name" in "mysql" database. That is "mysql.time_zone_name"

Solution: 
1. Grant database user "cacti" access to the TimeZone table in mysql database:


# mysql -u root -p mysql
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 670
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql>  flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye


2. Populate your MySQL TimeZone database before proceeding 


cd /usr/share/mysql
pwd
/usr/share/mysql

# ls -ltr | grep mysql
-rw-r--r--. 1 root root  10376 Jan 25  2017 mysql_test_data_timezone.sql
-rw-r--r--. 1 root root  17285 Jan 25  2017 mysql_system_tables.sql
-rw-r--r--. 1 root root   2855 Jan 25  2017 mysql_system_tables_data.sql
-rw-r--r--. 1 root root  45560 Jan 25  2017 mysql_fix_privilege_tables.sql


# mysql -u root -p mysql < mysql_test_data_timezone.sql
Enter password: 


No need for restarting the database!

Problem Solved?

4 comments:

Anonymous said...

Thanks guy from vietnam

Joshua said...

You are welcome.

Juan Martinez said...

Thank You very much

Unknown said...

thanku very much