升级zabbix到3.2.1报数据库升级失败的错误
发表于:2024-09-30 作者:千家信息网编辑
千家信息网最后更新 2024年09月30日,一 问题描述今天把zabbix server和zabbix proxy升级到3.2.1。先停掉zabbix server然后挨个升级zabbix proxy最后再升级zabbix server。zab
千家信息网最后更新 2024年09月30日升级zabbix到3.2.1报数据库升级失败的错误
一 问题描述
今天把zabbix server和zabbix proxy升级到3.2.1。先停掉zabbix server然后挨个升级zabbix proxy最后再升级zabbix server。zabbix proxy升级的时候没有错误,可以顺利进行。但是升级zabbix server的时候报出以下错误:
4250:20161010:001506.980 using configuration file: /opt/app/zabbix/conf/zabbix_server.conf 4250:20161010:001506.998 current database version (mandatory/optional): 03000000/03000000 4250:20161010:001506.998 required mandatory version: 03020000 4250:20161010:001506.998 starting automatic database upgrade 4250:20161010:001507.010 [Z3005] query failed: [1091] Can't DROP 'history_log_2'; check that column/key exists [drop index history_log_2 on history_log] 4250:20161010:001507.011 database upgrade failed
之前是对zabbix的数据库做过表分区
二 问题解决
查看zabbix问题反馈是由于zabbix 3.2在升级的时候需要drop history_log_2这个索引,如果没有就会报错。
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;
升级完成以后,由于history_text和history_log重新创建了,原来的分区脚本不能直接对这两个表分区
需要先手动分区后脚本才能使用
http://john88wang.blog.51cto.com/2165294/1771557
参考文档:
http://john88wang.blog.51cto.com/2165294/1771082
https://zabbix.com/forum/showthread.php?p=189543
https://support.zabbix.com/browse/ZBX-11203
升级
时候
问题
错误
脚本
数据
数据库
两个
先手
文档
索引
会报
参考
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
数据库实例名的意思
北京合浩元应用软件开发中心
计算机网络技术基础试题a
科技类互联网企业
如何找到数据库中的内容
星座数据库
湖州软件开发驻场业务
数据库的体例是什么
预防网络安全要点
2023软件开发大赛
java里面创建数据库表
机关 网络安全 制度
适合人工智能的数据库
网约车软件开发公司有哪些
icao发动机排放数据库
重庆短视频直播软件开发项目经理
网络安全包括舆情安全
小狗电器互联网科技 北京)
绿盟科技工业互联网龙头
传感网络技术
株洲哪里有软件开发
安全网络网络安全手抄报
技术好的浪潮服务器代理电话多少
网吧双服务器
IGTA服务器指令集
金蝶软件和云数据库有啥区别
与谷歌通讯服务器无法连接
网络安全管理中心制定
网络安全工程师应聘回答问题
怎么把数据库迁移到电脑上