# InnoDB issue with auto-generated config file

**URL:** <https://forums.percona.com/t/innodb-issue-with-auto-generated-config-file/2779>\
**Category:** Other MySQL® Questions\
**Created:** [June 27, 2013, 11:38am UTC](https://forums.percona.com/t/innodb-issue-with-auto-generated-config-file/2779 "2013-06-27T11:38:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysolomakin](https://avatars.discourse-cdn.com/v4/letter/y/9dc877/32.png) [@ysolomakin](https://forums.percona.com/u/ysolomakin)\
**Post date:** [June 27, 2013, 11:38am UTC](https://forums.percona.com/t/innodb-issue-with-auto-generated-config-file/2779/1 "2013-06-27T11:38:02Z")

</div>

Hi,  
I see a strange looking issue after applying the auto generated my.cnf to the fresh installed Percona server.

Here is the config file:

[mysql]

# CLIENT

port = 3306  
socket = /var/run/mysqld/mysqld.sock

[mysqld]

# GENERAL

user = mysql  
default\_storage\_engine = InnoDB  
socket = /var/run/mysqld/mysqld.sock  
pid\_file = /var/lib/mysql/ys-wa01.pid

# MyISAM

key\_buffer\_size = 32M  
myisam\_recover = FORCE,BACKUP

# SAFETY

max\_allowed\_packet = 16M  
max\_connect\_errors = 1000000  
innodb = FORCE

# DATA STORAGE

datadir = /var/lib/mysql/data/

# CACHES AND LIMITS

tmp\_table\_size = 32M  
max\_heap\_table\_size = 32M  
query\_cache\_type = 0  
query\_cache\_size = 0  
max\_connections = 500  
thread\_cache\_size = 50  
open\_files\_limit = 65535  
table\_definition\_cache = 4096  
table\_open\_cache = 4096

# INNODB

innodb\_flush\_method = O\_DIRECT  
innodb\_log\_files\_in\_group = 2  
innodb\_log\_file\_size = 256M  
innodb\_flush\_log\_at\_trx\_commit = 2  
innodb\_file\_per\_table = 1  
innodb\_buffer\_pool\_size = 5G

# LOGGING

log\_error = /var/lib/mysql/data/mysql-error.log  
log\_queries\_not\_using\_indexes = 1  
slow\_query\_log = 1  
slow\_query\_log\_file = /var/lib/mysql/data/mysql-slow.log

Here is the result of my attempt to restart the server:

tail /var/log/mysql/mysql-error.log  
InnoDB: Error: log file ./ib\_logfile0 is of different size 0 5242880 bytes  
InnoDB: than specified in the .cnf file 0 268435456 bytes!  
130627 16:46:05 [ERROR] Plugin ‘InnoDB’ init function returned error.  
130627 16:46:05 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.  
130627 16:46:05 [ERROR] Failed to initialize plugins.  
130627 16:46:05 [ERROR] Aborting

130627 16:46:05 [Note] /usr/sbin/mysqld: Shutdown complete

130627 16:46:05 mysqld\_safe mysqld from pid file /var/lib/mysql//ys-wa01.pid ended  
root@ys-wa01:/var/lib/mysql/mysql#

if I remove the cnf file - everything is working file, I’m able to restart the server with no errors.

Thanks for your guys help!

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [June 27, 2013, 1:04pm UTC](https://forums.percona.com/t/innodb-issue-with-auto-generated-config-file/2779/2 "2013-06-27T13:04:59Z")

</div>

Looks like your existing log file size (ib\_logfile\* in your data directory) are a different size (5MB) than what is now specified in your new configuration file (innodb\_log\_file\_size = 256M). You can either adjust that variable in the config file to match your existing log file sizes, or you can remove / move your existing log files (ib\_logfile\*) and allow MySQL to recreate them at the newly specified size.
