1)在MySQL上安装Zabbix数据库和用户:
2)参考地址:https://www.zabbix.com/documentation/3.4/manual/appendix/install/db_scripts
systemctl start mariadb # 开启数据库
mysql -uroot –p # 登录数据库:没有密码
create database zabbix character set utf8 collate utf8_bin; # 创建数据库
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; # 创建zabbix用户密码zabbix,并授权
FLUSH PRIVILEGES;
1.6 然后导入初始架构(Schema)和数据
cd /usr/share/doc/zabbix-server-mysql-3.4.8/
zcat create.sql.gz | mysql -uroot zabbix -p # 将表导入到刚刚创建的zabbix数据库中