|
|
zabbix监控忘记admin登录密码解决方法$ O1 U0 Q- K' d1 w3 N# q
2 M8 O- i6 m$ i! c4 c! ~9 X: n
首先登录数据库
1 p/ {% G3 _! d$ m6 L9 u2 D+ r8 p
[root@zabbix-server conf]# mysql -uzabbix -p6 l4 M3 D, ~: J( @7 n1 i8 L- q
mysql: [Warning] Using a password on the command line interface can be insecure.& |# J! N# F' @0 |( l7 [
Welcome to the MySQL monitor. Commands end with ; or \g.5 C; |. U) H: N5 W% @
Your MySQL connection id is 50
' W2 v3 V! e3 c1 z& K5 `Server version: 8.0.40 MySQL Community Server - GPL6 i9 E' j, O' G2 }5 K9 }
0 k1 s- k2 J" G& v# F8 |) tCopyright (c) 2000, 2024, Oracle and/or its affiliates.
[8 e; b3 Z8 B) H S0 d6 z8 u6 F1 ~% x" @1 z# Y( x
Oracle is a registered trademark of Oracle Corporation and/or its) V0 z2 J7 l ~' a( G' Q& F/ x0 v. e
affiliates. Other names may be trademarks of their respective; H+ U" O& i) h5 @5 O+ @
owners.2 }9 c3 J- i1 w9 d% l$ k/ ~
$ l+ J- o' E5 j) W6 P
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
: t6 v" C( D9 [: c3 S! ?; e$ w; P! w* t1 g8 D" `7 i) T
mysql> show databases;
/ T U' Y' z" a/ s: E% p: j+--------------------+
- U$ |; U9 }$ q| Database |5 D8 p v( L- t# |% G' _' u' h
+--------------------+! `9 n- h* x% f/ |" G
| information_schema |! [6 D) e( K. R, y; e! a4 M% z
| performance_schema |9 l8 ?9 D# C- h% @# |
| zabbix |
+ _' Q6 _4 G' M& t1 j0 @5 L+--------------------+
8 M7 R: ?- B# b7 F8 H0 V3 rows in set (0.01 sec)
. w" R& U' Y9 |- p( P0 {: @' P1 ^7 A2 B& J- R Z K5 @" ]
mysql> use zabbix* Y7 Q- a9 M7 V1 w" u! i9 Q
Reading table information for completion of table and column names
( l* }2 K3 F7 k( A/ ]3 nYou can turn off this feature to get a quicker startup with -A" H. D6 G2 {& @# L5 h6 I6 G
- Z) j; A* V$ g2 b# E9 IDatabase changed
0 F) E' l( S5 z6 ^+ H5 E/ \
0 t/ j; q' U, I3 X6 k
: g8 I5 ?& G5 ]& o. H5 D8 `* M- w; G+ L' D: Y) ~( y
mysql> select userid,username,name,passwd from users;& x5 X2 b- b0 W! J
+--------+----------+--------+--------------------------------------------------------------+, ~0 |4 X% X9 W
| userid | username | name | passwd |. p3 g6 h. A- ?( R$ u: y
+--------+----------+--------+--------------------------------------------------------------+
0 X( P6 g# r5 z2 s| 1 | Admin | Zabbix | $2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK |. B1 W- b; a+ B& V+ L4 ]
| 2 | guest | | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 |
2 \) U" Z* t% a5 E+--------+----------+--------+--------------------------------------------------------------+
% X& a$ R; u6 L5 g" [* t2 rows in set (0.00 sec)0 h2 e2 `8 V% f) N" \1 H
8 N5 P; ~* e; N' f* c
mysql> update users set passwd=MD5('victors123') where username='admin';/ q {7 z; m* \* c; [# Q# D
Query OK, 0 rows affected (0.00 sec)
/ U/ N1 T# `/ |& x3 WRows matched: 0 Changed: 0 Warnings: 0
4 ~1 {+ [- O/ f5 A) d- A
$ X- w8 ~/ E8 C3 E$ m( N/ o7 Q% I0 f ?6 A# \0 G0 c2 o& W
( w- ^1 Q$ D5 Q4 i+ L; @: I& ]: G' [
& j: i9 ?* L) [: u |
|