mysqladmin password 123456
mysql -uroot -p123456
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'zabbix';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
#授权远程登录
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
4.4 导入 Zabbix 数据至数据库中
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
4.5 禁用log_bin_trust_function_creators选项
mysql -uroot -p123456
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;