简体   繁体   English

MariaDB-找不到innodb_log_file_size

[英]MariaDB - Can't find innodb_log_file_size

I'm currently installing OTRS on Raspbian. 我目前正在Raspbian上安装OTRS。 I got it working with Ubuntu and MySQL, but its giving me problems with Raspbian and MariaDB. 我可以在Ubuntu和MySQL上使用它,但是它给我带来了Raspbian和MariaDB的问题。 I cant seem to find the innodb_log_file_size anywhere to change the size of it. 我似乎无法在任何地方找到innodb_log_file_size来更改它的大小。

My my.cnf looks like this: 我的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/

and using show variables like 'innodb_log_file_size'; 并使用show variables like 'innodb_log_file_size'; in mariadb gives me this: 在mariadb中给了我这个:

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

| Variable_name        | Value    |

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

Any tips to change it? 有任何改变的提示吗? Because I need to get rid of the error: 因为我需要摆脱错误:

"Error: Please set the value for innodb_log_file_size on your database to at least 256 MB" “错误:请将数据库上的innodb_log_file_size的值设置为至少256 MB”

You say there is a "problem" and an "error"; 您说有一个“问题”和一个“错误”; please provide the text of the error and/or other clues. 请提供错误文字和/或其他线索。

50M is a decent size for innodb_log_file_size . 50M是innodb_log_file_size一个不错的大小。 It can be set in the [mysqld] section of my.cnf. 可以在my.cnf的[mysqld]部分中进行设置。

For very busy systems, it should be higher; 对于非常繁忙的系统,它应该更高; for TEXT or BLOB columns over 5MB in size, it should be higher. 对于大小超过5MB的TEXTBLOB列,它应该更高。 But for most systems, 48M is plenty big. 但是对于大多数系统而言,48M足够大。

The setting is one of the hardest to change, so don't without a good reason. 该设置是最难更改的设置之一,因此请不要没有充分的理由。

Once you have been running for some time, compute 运行一段时间后,计算

 ( Uptime / 60 * innodb_log_file_size / Innodb_os_log_written )

to seem how many minutes between log rotations. 似乎轮转之间有多少分钟。 1 hour is a reasonable target. 1小时是一个合理的目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM