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 直接登录然后更改密码完成。