# 原生zabbix.sql 导入报错:Specified key was too long; max key length is 767 bytes
由于mysql默认vachar长度为767,需开启字符串最大长度限制
mysql> show variables like 'innodb_large_prefix';
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| innodb_large_prefix | OFF |
+---------------------+-------+
1 row in set (0.01 sec)
mysql> show variables like 'innodb_file_format';
+--------------------+----------+
| Variable_name | Value |
+--------------------+----------+
| innodb_file_format | Antelope |
+--------------------+----------+
1 row in set (0.02 sec)
# 修改关键参数
mysql> set global innodb_large_prefix=1;
Query OK, 0 rows affected (0.00 sec)
mysql> set global innodb_file_format=BARRACUDA;
Query OK, 0 rows affected (0.00 sec)
# 自动安装脚本中,已在zabbix_server.sh 安装脚本中写入以上代码