Database history tablesupgraded

  1. zabbix升级到6之后,配置安装完成会有一个红色输出,但是不影响zabbix使用,出于强迫症,找到了该问题的解决方法。

Database history tables upgraded: No. Support for the old numeric type
is deprecated. Please upgrade to numeric values of extended range
在这里插入图片描述

  1. 停止zabbix-server zabbix-agent nginx php-fpm相关服务,登录MySQL
[root@zabbix conf]# systemctl stop zabbix-server  zabbix-agent nginx php-fpm
[root@220-230 ~]# mysql -uroot -p  #登录MySQL
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 830
Server version: 8.0.31 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use zabbix
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> source /root/double.sql   #该文件在zabbix-server服务器下的/usr/share/zabbix-sql-scripts/目录下
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE trends
    -> MODIFY value_min DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
    -> MODIFY value_avg DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
    -> MODIFY value_max DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE history MODIFY value DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> exit
Bye
  1. zabbix.conf.php添加如下配置
$DB['DOUBLE_IEEE754'] = true;
  1. 重启zabbix-server
systemctl restart zabbix-server

在这里插入图片描述

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-25 17:02:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-25 17:02:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-25 17:02:01       87 阅读
  4. Python语言-面向对象

    2024-01-25 17:02:01       96 阅读

热门阅读

  1. Pytest基础

    2024-01-25 17:02:01       66 阅读
  2. 腾讯云个人服务器价格表,2024精准报价

    2024-01-25 17:02:01       76 阅读
  3. Spring和Spring Boot的区别

    2024-01-25 17:02:01       61 阅读
  4. 提升平台工程中的开发人员体验的6大策略

    2024-01-25 17:02:01       56 阅读
  5. 10Docker Compose快速入门

    2024-01-25 17:02:01       52 阅读
  6. vue.js的二十个知识点小结

    2024-01-25 17:02:01       56 阅读
  7. 三维重建衡量指标记录

    2024-01-25 17:02:01       62 阅读
  8. 致远OA如何开发 第十一篇 能做什么需求

    2024-01-25 17:02:01       59 阅读
  9. Spring Boot 使用validation校验参数

    2024-01-25 17:02:01       58 阅读
  10. Spring Boot Starters

    2024-01-25 17:02:01       55 阅读