|
|
zabbix监控忘记admin登录密码解决方法! M$ {* ^( {$ B5 f, m% a
! o; C, O! Y! G A# E5 C# S% Q& y首先登录数据库
6 e9 K, s) L4 K j0 Y4 b0 R: L! R8 I
[root@zabbix-server conf]# mysql -uzabbix -p
8 q2 F! i1 Q. Jmysql: [Warning] Using a password on the command line interface can be insecure.% l9 R# d m! n* t. N
Welcome to the MySQL monitor. Commands end with ; or \g.
3 @4 q, u, L7 J) ?Your MySQL connection id is 50
9 F& i& Z' r4 B5 x# d" IServer version: 8.0.40 MySQL Community Server - GPL
0 R" j0 h' }% ~1 `/ G
7 `* ^) Z; I& m; F2 qCopyright (c) 2000, 2024, Oracle and/or its affiliates.
4 P0 n8 ~: y% V+ E, _6 R1 L$ l' U$ P5 E/ a
Oracle is a registered trademark of Oracle Corporation and/or its' u) x& |2 F( y5 K. C
affiliates. Other names may be trademarks of their respective
$ V8 P- |1 g$ a$ p% D) s0 mowners.
8 ^) F7 Z3 n9 n! {6 m i" G$ y4 _' @! g/ d/ l9 F
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.' T# `& b. I+ K+ B$ C8 l8 ]) t8 }
) \6 |! q" i9 v1 cmysql> show databases;
1 ~4 A( K/ E0 A6 _+--------------------+
4 ^1 m }+ ~; H1 u2 D6 L$ p| Database |
4 g, l! L# V. y! y2 D, D+--------------------+" ~ p3 Q3 ?8 q$ @5 u
| information_schema |2 l; }: v# m8 \1 ~9 p) z: A5 _
| performance_schema |* b7 @6 d$ C7 m# ^, h4 ?9 E
| zabbix |
% X# j" l7 H X+--------------------+2 f9 g) n! C7 B/ G* x
3 rows in set (0.01 sec)
, W' d& g+ P0 y9 N$ y$ I! Z
. ~( E" t( Z' y1 r6 ?mysql> use zabbix! }7 [1 A! P" y& e2 g8 W; i
Reading table information for completion of table and column names4 r; Q/ e# k; D/ K2 @; J, Y' X0 h
You can turn off this feature to get a quicker startup with -A
7 x; n! T, r/ H" p L+ {
2 `2 ]6 z4 u5 z4 b0 IDatabase changed
, ?2 U$ R0 |8 U" X# z
5 U0 ^$ x3 m& J% y! z( u+ f2 Z
) q2 ]: c0 ?3 I6 F
4 y+ A( s; K3 U* ]4 ^$ [0 S( ]" Rmysql> select userid,username,name,passwd from users;
w8 E; u- Q b! I% l+ f& i$ p' p8 E+--------+----------+--------+--------------------------------------------------------------+- u! x. E. t% L1 P/ E2 k- C
| userid | username | name | passwd |; c- l- D$ Q! w! ?) J- u+ l
+--------+----------+--------+--------------------------------------------------------------+
/ R$ T& j! u) O, ~9 p A| 1 | Admin | Zabbix | $2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK |: O& ]5 E% P% s- I2 D* _, d# s
| 2 | guest | | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 |
1 c$ I( x. q7 c+--------+----------+--------+--------------------------------------------------------------+
# b& j, @: ~! r' E T2 rows in set (0.00 sec)
9 z5 v$ s9 J! V' W, f# N9 I" O E
8 d; v2 Z3 g3 w6 j& j! L' e& ?mysql> update users set passwd=MD5('victors123') where username='admin';
& s9 p7 Z8 `! N. O4 QQuery OK, 0 rows affected (0.00 sec)
5 V% M* v4 Z% w) DRows matched: 0 Changed: 0 Warnings: 0
2 M9 ^2 ], Z5 d( d; n' y' K3 \+ h6 W# l; y- p; M
z1 u6 U9 c& F3 |' l9 U- o4 H
6 @0 Z- s1 j- d! u# Y$ |6 U
# e3 y" U d( [$ i |
|