[root@plinuxos src]# vim /etc/my.cnf
......
character_set_server = utf8 ##增加改行,防止乱码
......
[root@plinuxos src]# systemctl restart mysqld
[root@plinuxos src]# /usr/local/mysql/bin/mysql -uroot ##进入mysql配置zabbix库
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 72
Server version: 5.6.35-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'juispan';
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Bye 5、导入自带数据库
[root@plinuxos src]# cd /usr/share/doc/zabbix-server-mysql-3.4.5/
AUTHORS ChangeLog COPYING create.sql.gz NEWS README
[root@plinuxos zabbix-server-mysql-3.4.5]# gzip -d create.sql.gz
[root@plinuxos zabbix-server-mysql-3.4.5]# export PATH=$PATH:/usr/local/mysql/bin/
[root@plinuxos zabbix-server-mysql-3.4.5]# mysql -uroot zabbix < create.sql 6、启动zabbix-server和httpd
[root@plinuxos ~]# systemctl start zabbix-server
[root@plinuxos ~]# systemctl start httpd 7、查看zabbix日志
[root@plinuxos ~]# less /var/log/zabbix/zabbix_server.log 8、配置zabbix