rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm yum install -y mysql-server mysql-devel /etc/init.d/mysqld start mysql_secure_installation Enter current password for root (enter for none): <–初次运行直接回车 Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车 Remove anonymous users? [Y/n] <– 是否删除匿名用户,生产环境建议删除,所以直接回车 Disallow root login remotely? [Y/n] <–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止 Remove test database and access to it? [Y/n] <– 是否删除test数据库,直接回车 Reload privilege tables now? [Y/n] <– 是否重新加载权限表,直接回车 mysql -uroot -pzabbix mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'zabbix'; mysql> flush privileges; mysql> show databases; 修改配置文件