List zabbix password:
grep "^DBPassword" /etc/zabbix/zabbix_server.conf
Authorize in mysql:
mysql -uzabbix -p
Use database zabbix:
use zabbix;
List all users:
select userid,alias,type from zabbix.users;
This will list:
+--------+---------+------+
| userid | alias | type |
+--------+---------+------+
| 1 | Admin | 3 |
| 2 | guest | 1 |
| 3 | another | 2 |
+--------+---------+------+
change rule for user 'another':
update users set type='3' where userid='3';
List again user list:
select userid,alias,type from zabbix.users;
'another' user has now Super admin role (type 3):
+--------+---------+------+
| userid | alias | type |
+--------+---------+------+
| 1 | Admin | 3 |
| 2 | guest | 1 |
| 3 | another | 3 |
+--------+---------+------+
All together:
[root@z347 ~]# grep "^DBPassword" /etc/zabbix/zabbix_server.conf
DBPassword=TaL2gPU5U9FcCU2u
[root@z347 ~]# mysql -uzabbix -p'TaL2gPU5U9FcCU2u'
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 184
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [zabbix]> select userid,alias,type from zabbix.users;
+--------+---------+------+
| userid | alias | type |
+--------+---------+------+
| 1 | Admin | 3 |
| 2 | guest | 1 |
| 3 | another | 2 |
+--------+---------+------+
3 rows in set (0.00 sec)
MariaDB [zabbix]> update users set type='3' where userid='3';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [zabbix]> select userid,alias,type from zabbix.users;
+--------+---------+------+
| userid | alias | type |
+--------+---------+------+
| 1 | Admin | 3 |
| 2 | guest | 1 |
| 3 | another | 3 |
+--------+---------+------+
3 rows in set (0.00 sec)
MariaDB [zabbix]> quit
Bye