1.登陸mysql
[root@localhost mysql]# mysql
2.進入zabbix庫
MariaDB [(none)]> use zabbix;
3,.查詢users表格
MariaDB [zabbix]> select from users; #頁面顯示不出 ‘ 星 ’ 注意!
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
| userid | alias | name | surname | passwd | url | autologin | autologout | lang | refresh | type | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page |
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
| 1 | Admin | Zabbix | Administrator | 5fce1b3e34b520afeffb37ce08c7cd66 | | 1 | 0 | en_GB | 30s | 3 | default | 0 | | 0 | 50 |
| 2 | guest | | | d41d8cd98f00b204e9800998ecf8427e | | 0 | 15m | en_GB | 30s | 1 | default | 0 | | 0 | 50 |
+--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+
2 rows in set (0.00 sec)
4.第1行 passwd 密碼是MD5加密文件,須要另開一個終端生成一個MD5密碼
[root@localhost mysql]# openssl
OpenSSL> md5
123456(stdin)= e10adc3949ba59abbe56e057f20f883e
注意輸完123456別敲回車,按Ctrl +d 按三次生成密碼,直接按回車就把空格帶進去了,切記!
5.修改密碼 「e10adc3949ba59abbe56e057f20f883e」 = 123456 這是我生成的密碼
MariaDB [zabbix]> update users set passwd="e10adc3949ba59abbe56e057f20f883e" where userid="1";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
6.查詢zabbix帳戶信息
MariaDB [zabbix]> select from users\G;
1. row
userid: 1
alias: Admin
name: Zabbix
surname: Administrator
passwd: e10adc3949ba59abbe56e057f20f883e
url:
autologin: 1
autologout: 0
lang: en_GB
refresh: 30s
type: 3
theme: default
attempt_failed: 0
attempt_ip:
attempt_clock: 0
rows_per_page: 50
2. row
userid: 2
alias: guest
name:
surname:
passwd: d41d8cd98f00b204e9800998ecf8427e
url:
autologin: 0
autologout: 15m
lang: en_GB
refresh: 30s
type: 1
theme: default
attempt_failed: 0
attempt_ip:
attempt_clock: 0
rows_per_page: 50
2 rows in set (0.00 sec)
7.帳戶爲Admin ,密碼123456 直接登陸而後更改密碼完成。mysql