The frontend does not match Zabbix database. Zabbix 4.0 数据库mariadb 10.4.9 报错

The frontend does not match Zabbix database.
除了这个问题

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix  zabbix -p 
Enter password:
ERROR 1118 (42000) at line 1278: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

这个问题是因为

The problem here is that InnoDB has a maximum row size in MariaDB and MySQL that is roughly equivalent to half of innodb_page_size. InnoDB’s row formats work around this problem by storing certain kinds of variable-length columns on overflow pages. However, different row formats can store different types of data on overflow pages. The DYNAMIC row format is the default row format in MariaDB 10.2 and later. For varchar columns, this row format can only store them on overflow pages if they are 256 bytes or longer:

解决方案

先清空错误库



drop database zabbix;
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
flush privileges;
quit;

 cp  /usr/share/doc/zabbix-server-mysql*/create.sql.gz   . 
 gunzip  create.sql.gz
 #在第一行插入 关闭严格模式
sed -ir  '1  iSET SESSION innodb_strict_mode=OFF;'    create.sql
cat create.sql | mysql -uzabbix  zabbix -p
#输入密码

ref


https://support.zabbix.com/browse/ZBX-16465
https://mariadb.com/kb/en/library/innodb-row-formats-overview/#upgrading-causes-row-size-too-large-errors

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dendysan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值