我使用mariadb 10.0.29,我需要将innodb文件大小更改为256M,默认大小为50M,
我的配置文件位于
/etc/mysql/mariadb.conf.d/50-server.cnf
我已添加以下行,但它不起作用.
[mysqld]
innodb_log_file_size=256M
我也试过设置innodb_log_file_size = 5033164800;
但它表明
ERROR 1238 (HY000): Variable 'innodb_log_file_size' is a read only variable
解决方法:
在执行此操作之前,您可能需要考虑两件事.
>确保innodb_fast_shutdown不应该是2.如果是的话?更改
到全球1.
>验证步骤1,查询:显示’innodb_fast_shutdown’等变量;
>关闭Mysql.
>确保将iblogfile0& 1复制到更安全的地方然后
从数据中移除目录.
>根据您的要求,对innodb_log_file_size更改my.cnf
期望的选择.
>启动Mysql
回滚:如果由于某种原因没有启动,则返回iblogfiles并启动.
UPDATE: In our chat we narrowed down that my.cnf was pointed to a
different file or picked default ones. We forced mysql to pick the
mentioned my.cnf via mysqld_safe –defaults-file. And it worked.
标签:mysql,mariadb,innodb,log
来源: https://codeday.me/bug/20190806/1601898.html