mysql - MariaDB - 找不到 innodb_log_file_size

标签 mysql mariadb innodb

我目前正在 Raspbian 上安装 OTRS。我让它与 Ubuntu 和 MySQL 一起工作,但它给我带来了 Raspbian 和 MariaDB 的问题。 我似乎无法在任何地方找到 innodb_log_file_size 来更改它的大小。

我的 my.cnf 是这样的:

The MariaDB configuration file

The MariaDB/MySQL tools read configuration files in the following order:
1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
2. "/etc/mysql/conf.d/*.cnf" to set global options.
3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
4. "~/.my.cnf" to set user-specific options.

If the same option is defined multiple times, the last one will apply.

One can use all long options that the program supports.
Run program with --help to get a list of available options and with
--print-defaults to see which it would actually understand and use.


This group is read both both by the client and the server
use it for options that affect everything

[client-server]
 Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

并在 mariadb 中使用 show variables like 'innodb_log_file_size'; 给我这个:

MariaDB [(none)]> show variables like 'innodb_log_file_size';
+----------------------+----------+

| Variable_name        | Value    |

+----------------------+----------+
| innodb_log_file_size | 50331648 |
+----------------------+----------+
1 row in set (0.01 sec)

有什么改变它的技巧吗?因为我需要摆脱错误:

"Error: Please set the value for innodb_log_file_size on your database to at least 256 MB"

最佳答案

你说有一个“问题”和一个“错误”;请提供错误文本和/或其他线索。

对于 innodb_log_file_size 来说,50M 是一个合适的大小。可以在my.cnf的[mysqld]部分设置。

对于非常繁忙的系统,它应该更高;对于大小超过 5MB 的 TEXTBLOB 列,它应该更高。但是对于大多数系统来说,48M 已经足够大了。

设置是最难更改的设置之一,所以不要没有充分的理由。

运行一段时间后,计算

 ( Uptime / 60 * innodb_log_file_size / Innodb_os_log_written )

日志轮换之间的间隔时间。 1 小时是一个合理的目标。

关于mysql - MariaDB - 找不到 innodb_log_file_size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47054878/

相关文章:

mysql - 按一个字段分组并统计匹配字段

mysql - 如何向包含数百万数据的表添加列

mysql - 导出和导入外键

mysql - InnoDB 还是 MyISAM?

php - CakePHP 奇怪的 saveAll 问题。返回true,但数据库中没有任何内容

php - MySQL 错误 - 如何修复?

php - 将多个值传递到复选框的 'value' 属性

MySQL查询优化5

mysql - 玛丽亚数据库 (MySQL) :Query slow when using sub query

MySQL 5.6 - InnoDB - DATA_FREE 未使用,但表不断增长