步骤:
1、安装一台mysql服务器,mysql版本与之前的版本一样
2、配置新装数据库:
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> exit
3、停止zabbix_Server进程,导出 zabbix数据库
#mysqldump -uroot -pPASSWORK --opt zabbix > zabbix.sql
3、传送zabbix.sql文件到新的服务器上
4、导入zabbix.sql到新的mysql中zabbix数据库
#mysql -uroot -pPASSWORD zabbix < zabbix.sql
5、修改网页文件zabbix.conf.php
<?php
// Zabbix GUI configuration file
global $DB; $DB['TYPE'] = 'MYSQL';
$DB['SERVER'] = 'localhost';
$DB['PORT'] = '0';
$DB['DATABASE'] = 'zabbix';
$DB['USER'] = 'root';#连接zabbix数据库的用户
$DB['PASSWORD'] = '123456';#连接zabbix数据库的用户的密码
// SCHEMA is relevant only for IBM_DB2 database
$DB['SCHEMA'] = '';
$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';
$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
?>
~
6、修改zabbix server配置文件:zabbix_server.conf
DBHost
DBPassword
DBPort
重启服务
转载于:https://blog.51cto.com/lesstraveller/1622507