create user 'zabbix'@'localhost' identified by 'your_chosen_password_here';
create database zabbix;
grant all privileges on zabbix.* to 'zabbix'@'localhost'; flush privileges;
exit;
6. 启动zabbix-server 后访问http://IP/zabbix,会帮你验证安装组件。遇到的问题有
(1)php模块的时间问题:修改/etc/php5/apache2/php.ini 中的date.timezone = Asia/Shanghai
(2) zabbix连接数据库问题,可以实时查看/var/log/zabbix/zabbix_server.log
(2.1) connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on '172.18.216.121' (111)
这个问题应该是mysql的监听,要从把bind_address=127.0.0.1改为实际的IP地址
(2.2) connection to database 'zabbix' failed: [1044] Access denied for user 'zabbix'@'%' to database 'zabbix'
本来在user表中以前有设置%访问权限,不过还是有问题。后来目测是重新设置了一遍解决。
1
grant all privileges on *.* to 'zabbix'@'%' identified by 'your_password' with grant option;