|
|
zabbix监控忘记admin登录密码解决方法6 R. T- Q* f' n( P6 F
/ g% O. P! Y% o# r# C# m+ B首先登录数据库
0 [+ k X7 R# q- H) X
, J/ ?. z6 x6 v2 Z+ Z1 A( p[root@zabbix-server conf]# mysql -uzabbix -p4 T& ?* l3 Y- m+ f! r
mysql: [Warning] Using a password on the command line interface can be insecure.) }' O# s4 d# G: [8 u
Welcome to the MySQL monitor. Commands end with ; or \g.3 G; Q7 @$ }4 w" z) L
Your MySQL connection id is 50
! v) r: G3 v8 Z" j0 V5 O* qServer version: 8.0.40 MySQL Community Server - GPL
) e0 |( } n7 {$ t7 \+ {" D' N; t \5 k6 [
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
- T: K( o+ t# y: e* K. t
O2 B' P4 e t+ t* gOracle is a registered trademark of Oracle Corporation and/or its
7 \+ P0 H1 p/ I4 Raffiliates. Other names may be trademarks of their respective
1 P* Q& Z; d# vowners.
$ H8 [* j4 c0 g/ }( P% L. z0 C" k, i& f' \5 ]/ N3 z5 t
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.$ a5 U' n, ]& V8 G* u1 n% L
) }$ e j" y! ?2 P; v& B
mysql> show databases;
- z) ~# a2 j* b2 B( y7 j4 _2 } o+--------------------+' ^2 K1 D' o5 w! r) t
| Database |
$ r1 M# R( ?( q3 ]0 z& y3 t+--------------------+7 z7 E7 E* s9 ?. E2 }4 u
| information_schema |
/ ?' P) u. E% x8 `! N| performance_schema |! w- p3 J% T$ T7 W/ E
| zabbix |
* G9 I0 j2 e' w& k) V& v0 \) p+--------------------+, Q& E: b) w4 h) D/ _
3 rows in set (0.01 sec)$ ?0 Z+ V# ~/ _
7 Q. N! r/ u: y5 r! I! L
mysql> use zabbix; m; U5 [( C7 @( ~
Reading table information for completion of table and column names
2 r7 m5 s; ~, B' R6 X/ K5 zYou can turn off this feature to get a quicker startup with -A
; L5 y: K$ u. u: H& \- }- v- n3 M- e5 n
Database changed& d3 _/ w6 N/ m1 g3 ~
$ f- A* t" I7 e" q( i4 p
/ T; N1 g4 I' F$ P( d/ w8 p$ q3 { _4 l0 H$ g7 j! ?0 Z) v# R
mysql> select userid,username,name,passwd from users;7 w7 P2 f& d$ m4 m' M3 ]
+--------+----------+--------+--------------------------------------------------------------+
% r6 k* W2 a( [ M J! v( Q6 B. H, C; d| userid | username | name | passwd |
2 t* y7 C, k) H$ w( q+ ?+--------+----------+--------+--------------------------------------------------------------+% e% I2 h. r0 I' f h
| 1 | Admin | Zabbix | $2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK |& q. ?9 P |6 W4 u
| 2 | guest | | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 |% K" N2 W& C, i) i% j3 L i# W
+--------+----------+--------+--------------------------------------------------------------+) B/ V' t. U) ]; L8 f+ H+ }% ^
2 rows in set (0.00 sec)- ?" h6 B% o4 _4 d' X7 m" z4 }
2 V: D& ^6 x; H# m$ T) Vmysql> update users set passwd=MD5('victors123') where username='admin';
1 i2 `! N: z0 S5 O/ iQuery OK, 0 rows affected (0.00 sec)
% F( p1 S, R5 c8 }3 X2 h& x% _Rows matched: 0 Changed: 0 Warnings: 0
! |" @7 r3 e5 z, X2 m2 |
$ h( i5 }1 x O- f% k. w$ M. s' v: D7 ^- d' A5 v' n
: o- _. z3 Y7 ?! J7 e# i
0 ?, G( r' C7 i: Y. }/ r/ K* q |
|