In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
zabbix3.2 version of the source code installed, the current version of the 2.4 upgrade to version 3.2 operation, only need to export the database backup of 2.4, and then import it into version 3.2 database can be.
1. Stop zabbix related services
service zabbix_server stopservice zabbix_agentd stop service mysqld stopservice php-fpm stop
2, zabbix2.4 database backup
mysqldump --opt -R -uzabbix -p zabbix --ignore-table=zabbix.history --ignore-table=zabbix.history_log --ignore-table=zabbix.history_str --ignore-table=zabbix.history_text --ignore-table=zabbix.history_uint --ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint > zabbix.sql
Notes:
-opt: This Mysql dump command parameter is optional. If this option is taken, it means that the quick, add-drop-table, add-locks, extended-insert, lock-tables parameters of Mysql dump command are activated. That is, these parameters are not required when exporting Mysql database information using Mysql dump through the-opt parameter.
--ignore-table: do not export the formulation table, this item can be added according to the specific situation, because there are too many historical data, only the important zabbix information is exported, saving time.
3. Import database backup into zabbix3.2 database
service mysqld startmysql -uzabbix -p zabbix < zabbix.sql
4. Start the server
service php-fpm startservice zabbix_agentd startservice zabbix_server start
However, this import database is not up to the error, specific analysis of the specific problem, to see the zabbix_server.log log, find out why. The problem I encountered is zabbix-server in the self-test upgrade database, prompt some tables are already exist, resulting in startup failure, since the existence of the cause to delete the good.
Here are the tables I deleted:
SET FOREIGN_KEY_CHECKS = 0;drop table application_prototype;drop table item_application_prototype;drop table application_discovery;drop table opinventory;drop table opinventory;drop table sysmap_user;drop table sysmap_usrgrp;drop table screen_user;drop table screen_usrgrp;drop table slideshow_user;drop table slideshow_usrgrp;drop table trigger_tag;drop table event_tag;drop table problem;drop table event_recovery;drop table problem_tag;drop table correlation;drop table corr_condition;drop table corr_condition_tag;drop table corr_condition_group;drop table corr_condition_tagpair;drop table corr_condition_tagvalue;drop table corr_operation;drop table task;drop table task_close_problem;DROP TABLE history_log;DROP TABLE history_text;CREATE TABLE `history_log` (`id` BIGINT(20) UNSIGNED NOT NULL,`itemid` BIGINT(20) UNSIGNED NOT NULL,`clock` INT(11) NOT NULL DEFAULT '0',`timestamp` INT(11) NOT NULL DEFAULT '0',`source` VARCHAR(64) NOT NULL DEFAULT '' COLLATE 'utf8_bin',`severity` INT(11) NOT NULL DEFAULT '0',`value` TEXT NOT NULL COLLATE 'utf8_bin',`logeventid` INT(11) NOT NULL DEFAULT '0',`ns` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY (`id`),UNIQUE INDEX `history_log_2` (`itemid`, `id`),INDEX `history_log_1` (`itemid`, `clock`))COLLATE='utf8_bin'ENGINE=InnoDB;CREATE TABLE `history_text` (`id` BIGINT(20) UNSIGNED NOT NULL,`itemid` BIGINT(20) UNSIGNED NOT NULL,`clock` INT(11) NOT NULL DEFAULT '0',`timestamp` INT(11) NOT NULL DEFAULT '0',`source` VARCHAR(64) NOT NULL DEFAULT '' COLLATE 'utf8_bin',`severity` INT(11) NOT NULL DEFAULT '0',`value` TEXT NOT NULL COLLATE 'utf8_bin',`logeventid` INT(11) NOT NULL DEFAULT '0',`ns` INT(11) NOT NULL DEFAULT '0',PRIMARY KEY (`id`),UNIQUE INDEX `history_text_2` (`itemid`, `id`),INDEX `history_text_1` (`itemid`, `clock`))COLLATE='utf8_bin'ENGINE=InnoDB;
Notes:
SET FOREIGN_KEY_CHECKS = 0;#is to turn off foreign key checking. If it is not turned off, the above table cannot be deleted.
service zabbix_server start
Should be able to get up, specific problems need to be combined with logs to investigate, each environmental problem may be different, so there should be targeted to solve.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.