找回密码
 注册
查看: 939|回复: 3

错误: 您的Cacti数据库登录帐户无权访问MySQL TimeZone数据库。 请提供Cacti数据库帐户对 "mysql" 数据库中 &

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-9-21 17:00:00 | 显示全部楼层 |阅读模式
错误: 您的Cacti数据库登录帐户无权访问MySQL TimeZone数据库。 请提供Cacti数据库帐户对 "mysql" 数据库中 "time_zone_name" 表的 "select" 访问权,并在继续之前填充MySQL的TimeZone信息。
! d' E. K4 L$ k. u6 j) j/ Q  x: w0 G  @0 i1 {5 e* C
- F4 b( w5 k, f, ~" K
6 |: h+ e; G, X% @" P
[root@ceph1 html]# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
5 i. ]) Z8 U# d5 u- T% [0 Q' |Enter password:
# m5 s9 d% Z0 C6 M# F% I+ z% ~Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
) z! S# l. c8 R$ _" I) @6 W$ y1 L' e5 y
3 }0 S6 G$ g5 e) F8 [9 a( B( K/ sWarning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
; o9 G+ |% `7 q/ Q+ n$ E4 B5 ~8 \, L# `. V4 D, ~. Y/ Y, D+ v9 ]. @
[root@ceph1 ~]# mysql -u root -p
* f) W9 v; X1 ?# ~7 P, }5 M8 R* ]Enter password:
0 V  p2 v# q3 h! e" d/ Z3 NWelcome to the MariaDB monitor.  Commands end with ; or \g.
4 n9 y' r" w& o" m9 e: K2 E7 YYour MariaDB connection id is 7
1 m% b# [( n6 k$ c' v4 rServer version: 5.5.68-MariaDB MariaDB Server; F5 L! f0 j# o' G$ O2 _  |+ ^
0 S# `4 Z8 L- |- j1 ^6 d/ J
  e2 I7 \6 q& Z8 ^$ m
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
0 n  ^$ m7 K8 l) u2 W: T7 U) O
  {& k* B  b4 m3 }" g) h
. x' ^6 i  n' v0 QType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
2 E, n, b* I7 Q: f& C& n3 p" H" x9 H  K
! I5 j' M) Q& `% f5 ^% w
MariaDB [(none)]>  GRANT SELECT ON mysql.time_zone_name TO cactiuser@localhost IDENTIFIED BY 'cactiuser';+ `, h( Z  d- t" Z! E: P+ H
Query OK, 0 rows affected (0.00 sec)
+ t- o, l1 u; B% o* [
1 K4 f, p1 P3 U/ V$ q9 t4 z

& r% w# G9 P- |) O( \0 N

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-9-22 14:18:14 | 显示全部楼层
mysql> GRANT SELECT ON mysql.time_zone_name TO cactiuser@'localhost' IDENTIFIED BY 'cactiuser';# e, `! Y- Q: j2 \) {4 N3 z
Query OK, 0 rows affected (0.00 sec)& L3 p1 Q4 p' {

5 X4 D2 i' s' W2 W/ j5 F5 mmysql>

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-9-22 17:51:37 | 显示全部楼层
[root@ceph1 ~]# /var/lib/mysql/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ | mysql -u root -p mysql/ M' U9 r, \# R+ a* W3 k  n: `
Enter password:
9 F# F( p+ O- o8 I3 G( O: y) L7 \* ~Warning: Unable to load '/usr/share/zoneinfo//iso3166.tab' as time zone. Skipping it.
8 V: r' ~! ~7 Z; t. iWarning: Unable to load '/usr/share/zoneinfo//leapseconds' as time zone. Skipping it.* n2 g+ u+ i. {& Z6 S1 `0 s( k5 {
Warning: Unable to load '/usr/share/zoneinfo//tzdata.zi' as time zone. Skipping it.
2 v" b; u: [5 C0 G4 v% i' VWarning: Unable to load '/usr/share/zoneinfo//zone.tab' as time zone. Skipping it.
& N' L2 C+ ~, R) ]! ?Warning: Unable to load '/usr/share/zoneinfo//zone1970.tab' as time zone. Skipping it.

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-9-22 18:00:47 | 显示全部楼层
[root@ceph1 ~]# vim /etc/php.ini * W% ^3 D4 F+ S1 p6 ?5 c0 b
date.timezone = Asia/Shanghai
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:55 , Processed in 0.019830 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表