Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danerlt opened this issue Nov 20, 2017 · 8 comments
Closed

Comments

@danerlt
Copy link

danerlt commented Nov 20, 2017

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 .

@lamabutbul
Copy link

same here :(

@danriti
Copy link

danriti commented Dec 22, 2017

running into this today as well

@danriti
Copy link

danriti commented Dec 22, 2017

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.

@yosifkit
Copy link
Member

@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?

@danriti
Copy link

danriti commented Dec 22, 2017

@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.

@thaJeztah
Copy link

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

@tianon
Copy link
Member

tianon commented Dec 29, 2017

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!

@tianon tianon closed this as completed Dec 29, 2017
@hamedhr
Copy link

hamedhr commented Oct 28, 2018

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants