1、确保数据库服务器已启动并正在运行,执行如下命令

#mysql -uroot -p
#123456
#mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
#mysql> create user zabbix@localhost identified with mysql_native_password by "password";
#mysql> grant all privileges on zabbix.* to zabbix@localhost;
#mysql> set global log_bin_trust_function_creators = 1;
#mysql> use mysql;  #删除空用户名。更新权限
#mysql> delete from user where user=' ';
#mysql> flush privileges;
#mysql> quit;

2、导入初始架构和数据,系统将提示您输入新创建的密码

 zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

#password

 

更多推荐