易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 21|回复: 2
收起左侧

zabbix监控忘记admin登录密码解决方法

[复制链接]
发表于 2025-2-8 17:01:40 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
zabbix监控忘记admin登录密码解决方法
! H0 k) o& {4 _& F" Y
0 k1 \/ A/ t: X% N) K3 S首先登录数据库2 i6 l$ B1 u+ a0 L6 y8 C

; a9 u; E) V$ k, d9 p[root@zabbix-server conf]# mysql -uzabbix -p3 }1 H  _, Z+ Y* o6 H
mysql: [Warning] Using a password on the command line interface can be insecure.
3 I- ]0 @5 L( a) ]Welcome to the MySQL monitor.  Commands end with ; or \g.
0 r" t1 V% O( C& E5 r2 y" uYour MySQL connection id is 50
$ e3 P1 w* N1 E& \Server version: 8.0.40 MySQL Community Server - GPL! k  Y% `' P" V' N6 O" J* o0 b
. x& E9 F  ^; A1 B! @0 Q7 e* x
Copyright (c) 2000, 2024, Oracle and/or its affiliates.. d2 h1 p+ n# T: E( e$ z8 m& d% Q
1 d/ u% Z% g, k4 Y8 c) t6 }7 P
Oracle is a registered trademark of Oracle Corporation and/or its
! b8 R) x' W! d! U% baffiliates. Other names may be trademarks of their respective
$ H! J5 n* t$ T+ Uowners.
* I* d) d, o2 ?! F; D7 q
2 Y3 t/ Q) V' ^Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
' y: T2 A9 Z% L4 O6 o3 z8 Z$ e1 l9 w: P+ w
mysql> show databases;
! U% n" @6 B, g% p  V2 o1 k3 q+ k% G+--------------------+2 L3 W* z$ e' @3 i5 a! F) @' P6 K& _
| Database           |3 k+ R/ g0 R2 ?# N9 x1 c* {
+--------------------+$ w  T8 Y: L- m# B
| information_schema |6 B/ [# w- p: f' k6 k0 U
| performance_schema |
3 {8 h. p  }6 i9 a# e' u| zabbix             |/ F* h+ u8 i& `. W
+--------------------+. C7 H8 C2 N, E! f! \& A* Z
3 rows in set (0.01 sec)
, n& ~0 J  W9 J& d
" k' G$ E5 \% h6 k+ Amysql> use zabbix
, ~* [( v4 M* d8 tReading table information for completion of table and column names4 @3 R/ U! X0 Z6 g) _+ Q& A) B
You can turn off this feature to get a quicker startup with -A: }- [0 f2 c+ ], b6 d

$ ^  E# L8 k! f& x+ r. LDatabase changed9 d0 T  o% @  u9 D* m" l
5 [) m9 J. D3 }) l! R1 i% C; X

$ y% ^4 |. S/ j1 m2 g
9 L! W1 [; F9 p- F  B: U1 Zmysql> select userid,username,name,passwd from users;
" M4 `/ M) u+ Y3 V% _7 C6 h+--------+----------+--------+--------------------------------------------------------------+
5 b9 A" y3 C- W| userid | username | name   | passwd                                                       |$ u% G/ H, ~/ F: V
+--------+----------+--------+--------------------------------------------------------------+( o* ?  J( ^. _' A- ]1 O1 C
|      1 | Admin    | Zabbix | $2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK |
3 I9 f7 |  V3 ~0 q6 |/ b|      2 | guest    |        | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 |. C- V$ a) a- V: ?' D
+--------+----------+--------+--------------------------------------------------------------+
% e* |' i5 n' l( V. B2 y' }2 rows in set (0.00 sec)
3 J2 Q+ V* P0 h" O2 |# e$ s' \1 s# M5 i8 U- v
mysql> update users set passwd=MD5('victors123') where username='admin';
6 J- ]. A; [' d: W# C' cQuery OK, 0 rows affected (0.00 sec)% r6 T. m  m9 R7 ~  `
Rows matched: 0  Changed: 0  Warnings: 0
5 N8 v0 |1 y( n" s! {
4 g; A# Q- X* y7 X% ]) |, a
8 a1 Y' {  B9 t" {9 l2 ?; X( R  \3 C, N
& c; f3 ?) W' ?
 楼主| 发表于 2025-2-8 17:16:26 | 显示全部楼层
mysql> update users set passwd=MD5('victors123') where username='Admin';- c/ J& ]7 @. c( g1 }
Query OK, 1 row affected (0.00 sec)6 O" E: d4 p/ ]& y& H- V, m8 J
Rows matched: 1  Changed: 1  Warnings: 0. q, K! M4 M) c! w, t/ Q
8 S" l# ^. E, H1 A
mysql> flush privileges;
1 c- c6 \+ y2 RQuery OK, 0 rows affected (0.02 sec)
; Y; ^7 L: X, {4 {( ~) a; @+ x: N3 ?6 H( Q3 b9 b
mysql> select userid,username,name,passwd from users;
8 c1 g8 Z7 y$ [& p, o, ?+ x" e+--------+----------+--------+--------------------------------------------------------------+
. p6 Y' X, K3 ?7 h  O6 X| userid | username | name   | passwd                                                       |+ v. ?1 n9 h6 u9 r9 n; q* V3 g: D
+--------+----------+--------+--------------------------------------------------------------+  L, u/ h5 S; T8 l- X$ s
|      1 | Admin    | Zabbix | f82d61a5bae93646df737371905f8d20                             |5 a2 Q$ V( [; C% P% c
|      2 | guest    |        | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 |
) g5 S  w' O. v. c  ~3 o2 M; l+--------+----------+--------+--------------------------------------------------------------+% {0 x  D) J. v1 a
2 rows in set (0.00 sec)
* J: x1 i- N. i3 b% H  W, @5 T# ]1 L7 U: H
 楼主| 发表于 2025-2-8 17:25:06 | 显示全部楼层
echo -n admin |openssl md5
* F9 J) Q) e- ](stdin)= 21232f297a57a5a743894a0e4a801fc32 P$ f0 v# m% r

# }2 T2 h. `2 Y* }1 U8 K0 lmysql> update users set passwd='21232f297a57a5a743894a0e4a801fc3' where userid='1';
% W9 N3 b( I' z1 I; gQuery OK, 1 row affected (0.00 sec)5 N2 H% o7 s" H+ W; {
Rows matched: 1  Changed: 1  Warnings: 0
1 O8 A7 w8 X# i% `. g2 ^, s
4 W0 N4 Z0 g/ y, C2 ]  [mysql> flush privileges;
2 z8 z: P  F9 }+ u' vQuery OK, 0 rows affected (0.02 sec)" C; X* U- H0 B! O( i3 I

! Q+ \* ^& c- n9 r6 ?! I( `# V
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:27 , Processed in 0.042801 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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