# ibdata1 page size diffrent after upgrading MySQL 5.6 to 5.7



## tuaris (Sep 13, 2019)

For example I did a `pkg install -y mysql56-server` on a fresh FreeBSD 12.x install.    Months later MySQL 5.7 gets installed after I do a `pkg upgrade -y`, this happens:


```
InnoDB: The Auto-extending innodb_system data file '/var/db/mysql/ibdata1' is of a different size 4864 pages (rounded down to MB) than specified in the .cnf file: initial 8192 pages, max 0 (relevant if non-zero) pages!
```

I've run into this before, but I never remember how to fix it.  A Google search leads me to https://forums.freebsd.org/threads/just-upgraded-mysql-from-5-6-to-5-7.57104/.  It's a fine post that fixes the problem for me each time.   It tells me to change a value in /usr/local/etc/mysql/my.cnf


```
innodb_data_file_path           = ibdata1:128M:autoextend
```

Changes to 


```
innodb_data_file_path           = ibdata1:10M:autoextend
```

MySQL starts, I run `mysql_upgrade`, and I get on with my day.

The reason I never remember how to fix this is because I don't understand what the problem is.  I hope someone can clarify that for me. 

Just in case it comes up....


```
sysctl hw.pagesize
hw.pagesize: 4096
```


----------



## SirDice (Sep 16, 2019)

Actually, the default is set to `ibdata1:128M:autoextend` for both 5.6 and 5.7:






						[ports] Contents of /head/databases/mysql56-server/files/my.cnf.sample.in
					






					svnweb.freebsd.org
				








						[ports] Contents of /head/databases/mysql57-server/files/my.cnf.sample.in
					






					svnweb.freebsd.org
				




That said, this is often a setting that needs to be tuned. So I suspect you did at some point in time, then forgot about it.


----------

