shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
shell> cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
shell> mysql -uzabbix -p zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -p zabbix < images.sql
shell> mysql -uzabbix -p zabbix < data.sql
第一行的password 是root用户的,如果root用户没有密码可以不加-p参数
第三行的password 是zabbix用户的密码也是以后你zabbix配置文件连接数据库需要的密码
第四行的版本可能会变,进入自己下载的相应版本的目录里
修改zabbix配置文件: