在安装cacti时,有一段报错
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.
|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 | 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. |
解决办法:登录mysql,执行以下内容
mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost IDENTIFIED BY 'cactiwhsir'; mysql> flush privileges;
|-----|-----------------------------------------------------------------------------------------------------------------------| | 1 2 | mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost IDENTIFIED BY 'cactiwhsir'; mysql> flush privileges; |
然后发现又报错
ERROR: Your MySQL TimeZone database is not populated. Please populate this database before proceeding.
|---|--------------------------------------------------------------------------------------------------------| | 1 | ERROR: Your MySQL TimeZone database is not populated. Please populate this database before proceeding. |
解决办法:执行以下内容
/usr/local/mysql/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -uroot -p mysql
|---|----------------------------------------------------------------------------------------| | 1 | /usr/local/mysql/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -uroot -p mysql |