天天看點

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)

作者:運維技術站

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)

1、連接配接資料庫;

[root@localhost /]# mysql -uroot -p

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)
  1. 檢視資料庫;

MariaDB [(none)]> show databases;

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)

3、進入zabbix資料庫;

MariaDB [(none)]> use zabbix;

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)

4、檢視資料庫内各表;

MariaDB [zabbix]> show tables;

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)
Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)
  1. 檢視“users”表所有字段

MariaDB [zabbix]> select * from users;

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)
  1. admin密碼使用線上生成MD5加密的32位字元串MD5線上加密/解密/破解—MD5線上 (sojson.com)
Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)
  1. 修改更新密碼;

MariaDB[zabbix]>update users set passwd='21232f297a57a5a743894a0e4a801fc3' where userid='1';

Mysql更改資料庫登入密碼(Zabbix忘記登入密碼、重置密碼)

8、使用密碼:admin登入即可,登入後可更改為其它密碼

繼續閱讀