【问题标题】:Impact of InnoDB setting modification on existing/new databasesInnoDB 设置修改对现有/新数据库的影响
【发布时间】:2019-11-25 20:03:58
【问题描述】:

我在 Debian 9.8 上使用 MariaDB 版本 10.1.38,我遇到(并解决了)两个新安装的应用程序(Directus 7 和 Laravel 5.8)的以下问题:

SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.

此修复适用于 Directus 7 和我的 Laravel 5.8,其中 Directus 无法使用适用于 Laravel 的 Schema::defaultStringLength(191); 修复进行修补。


reasons for this issue are discussed within this separate form,但是我的问题与修复的影响有关。

50-server.cnf 文件进行了以下更改:

innodb_large_prefix = 1
innodb_file_format = Barracuda #usually antelope
innodb_default_row_format = dynamic #usually compact

为了修复 Directus 7,我还将该特定数据库的编码更改为 utf8_unicode_ci,但这只会影响该数据库。

我的问题如下:InnoDB设置修改对使用此安装的其他数据库有什么影响? 这会破坏现有的安装模式(例如 Drupal/Joomla)吗?这将如何影响使用此 MariaDB 实例的未来应用程序?

提前致谢。

【问题讨论】:

    标签: mysql sql mariadb mariadb-10.1


    【解决方案1】:

    几乎。还需要两件事:

    SET GLOBAL innodb_file_format=Barracuda;
    SET GLOBAL innodb_file_per_table=1;
    

    这是该方法,以及 4 个其他解决 767 问题的方法:http://mysql.rjweb.org/doc.php/limits#767_limit_in_innodb_indexes

    【讨论】:

      猜你喜欢
      • 2020-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-25
      • 1970-01-01
      • 2019-05-21
      • 2013-12-04
      • 2017-12-03
      相关资源
      最近更新 更多