Mysql: InnoDB: auto-extending data file ./ibdata1 is of a different size 0 pages

Created on 20 Nov 2017  Â·  8Comments  Â·  Source: docker-library/mysql

I use docker run --name db -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -v /d/workspace/data/mysql:/var/lib/mysql -d mysql:5.6 to run mysql container.But it went wrong, this is the error log:

2017-11-20 02:56:52 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --expli
timestamp server option (see documentation for more details).
2017-11-20 02:56:52 0 [Note] mysqld (mysqld 5.6.38) starting as process 1 ...
2017-11-20 02:56:52 1 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Table 'mysql.plugin' doesn't exist
2017-11-20 02:56:52 1 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-11-20 02:56:52 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-11-20 02:56:52 1 [Note] InnoDB: The InnoDB memory heap is disabled
2017-11-20 02:56:52 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-11-20 02:56:52 1 [Note] InnoDB: Memory barrier is not used
2017-11-20 02:56:52 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-11-20 02:56:52 1 [Note] InnoDB: Using Linux native AIO
2017-11-20 02:56:52 1 [Note] InnoDB: Using CPU crc32 instructions
2017-11-20 02:56:52 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-11-20 02:56:52 1 [Note] InnoDB: Completed initialization of buffer pool
2017-11-20 02:56:52 1 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 0 pages
 MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2017-11-20 02:56:52 1 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to a
 to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back
and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files fu
did not yet use them in any way. But be careful: do not remove old data files which contain your precio
2017-11-20 02:56:52 1 [ERROR] Plugin 'InnoDB' init function returned error.
2017-11-20 02:56:52 1 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-11-20 02:56:52 1 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-11-20 02:56:52 1 [ERROR] Aborting

How to resolve it .

Most helpful comment

Ok, I think I might have a work around for this.

When I ran docker system df, it turned out that I was using ~50GB of docker images. I've noticed in the past that docker acts "odd" with this amount of docker images, so I ran the following command to remove any "dangling" images:

docker rmi $(docker images -f "dangling=true" -q)

This freed up ~28GB of docker images and I no longer ran into this error with the mysql container.

All 8 comments

same here :(

running into this today as well

Ok, I think I might have a work around for this.

When I ran docker system df, it turned out that I was using ~50GB of docker images. I've noticed in the past that docker acts "odd" with this amount of docker images, so I ran the following command to remove any "dangling" images:

docker rmi $(docker images -f "dangling=true" -q)

This freed up ~28GB of docker images and I no longer ran into this error with the mysql container.

@danriti, that is strange; I am constantly around 240GB+ of images (since I build test every official-image) and haven't run into this issue. Are you perhaps using a VM on Windows or OSX?

@Lt-grint, Are more details you can give us? Host information, ie OSX, Windows 10 Pro? I assume some sort of Windows because of /d/. docker version? docker info? Are you using "Docker for Windows" or "docker-toolbox"? Perhaps @danriti's hint about running out of space?

@yosifkit it is indeed very strange. i'm using "Docker for OSX" natively (not using a VM), so i really have no idea if my disk observations are just purely coincidence or not.

The default size of the VM used on Docker soft Mac is 64GB, so adding some additional things that are stored inside the VM, probably it runs out of disk space.

Note; for cleaning up unused images, you can use docker image prune. Cleanup all unused resources (containers, images, networks, and optionally, volumes) with docker system prune

Closing since this appears to be both explained well and not an issue with the image (but rather one with the Docker host upon which it's being run). Thanks!

I changed shared folder's permission and everything worked.
Folder's properties > security > users permissions

Windows10/Mariadb/Docker18.06.1-ce-win73 (19507)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bernex picture bernex  Â·  4Comments

KomaBeyond picture KomaBeyond  Â·  4Comments

AdriVanHoudt picture AdriVanHoudt  Â·  4Comments

TheNotary picture TheNotary  Â·  4Comments

jicki picture jicki  Â·  3Comments