Zabbix忘记Admin登录密码的解决方法

问题描述:

有时候忘记Zabbix admin的密码了,因为账号太多

解决方案:

1、zabbix连接的是mysql数据库

[root@localhost /]# mysql -uroot -pAbc123 #-u是用户名,-p后面是密码

2、进入mysql数据库以后查询users表

MariaDB [mysql]> use zabbix;
MariaDB [zabbix]> show tables;
MariaDB [zabbix]> select * from users;
MariaDB [zabbix]> select userid,alias,passwd from users;

 3、生成一个新密码MD5,admin是密码

[root@localhost ~]# echo -n  admin  | openssl md5
(stdin)= 21232f297a57a5a743894a0e4a801fc3

4、然后update表数据,userid=1的这个用户

MariaDB [zabbix]> update users set  passwd='21232f297a57a5a743894a0e4a801fc3' where userid = '1';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

5、刷新重新加载权限表

MariaDB [zabbix]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.03 sec)

猜你喜欢

转载自www.linuxidc.com/Linux/2019-04/158347.htm