- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
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' ?
|
|