Skip to content

The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! #611

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

Closed
xuping110 opened this issue Nov 28, 2019 · 9 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@xuping110
Copy link

i had use docker on windows 10 with shared disk,when I run code with -V ,the mariadb create succeed,but start with errors:
InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Dec 2, 2019
@wglambert
Copy link

Are you using a pre-populated volume or is the entrypoint initializing your databases?

I would make an issue over at https://github.com/docker/for-win/issues since this seems related to your environment and not necessarily an issue with the image

@wglambert
Copy link

There was also this answer to the same error in a different thread MariaDB/mariadb-docker#95 (comment)

the VOLUME line you declare is probably not doing what you think it is doing (see volumes). It is creating a folder at the path /data:/var/lib/mysql/ in the container. VOLUME in a Dockerfile can only declare a directory as a volume and cannot pre-seed where to mount that volume on run.

To use the already defined volume on Docker for Windows you have to use a named volume like tianon suggested in the comments above yours.

$ docker run -d -p 3306:3306 --name mariadb -v mysql-data:/var/lib/mysql stevenwillett/mariadb
$ # to see the volume
$ docker volume ls

Unfortunately, you cannot mount the folder for MariaDB to the host using Docker for Windows because it presents the shared files/folders permissions to the Linux container as root owned with writable only by root (755).

See also docker-library/percona#42 (comment).

And this as well MariaDB/mariadb-docker#95 (comment)

We recently added #168 which should make sharing a directory from a windows host possible. Try the following (I don't have a host with Docker for Windows at the moment, but it worked when I last checked):

$ # also updated to specify a version of mariadb so that things don't break when latest becomes 10.4
$ docker run --name mariadb -d -v D:\Projects\docker\docker-qub:/var/lib/mysql -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=address -e >MYSQL_ROOT_PASSWORD=password mariadb:10.3 --innodb-flush-method=fsync

For future users that are using docker-compose it would be adding --innodb-flush-method=fsync to the command.

Going to close since this is an issue with Docker for Windows

@ju5t
Copy link

ju5t commented Dec 7, 2020

@wglambert for the record, I have this issue on MacOS too. This is a relevant part of the docker-compose.yml.

services:
  mysql:
    image: mysql:5.7
    restart: always
    volumes:
      - ./mysql:/var/lib/mysql

@ibrahimawadhamid
Copy link

I'm facing the same issue on Ubuntu 20.04

@sign0
Copy link

sign0 commented Jan 16, 2021

Same issue on Debian 10 ...

@dEROZA
Copy link

dEROZA commented Feb 7, 2021

Try to configure more correctly your volumes in compose.yml file

@felixhao28
Copy link

In my case, I ran out of disk space and this happened.

@materialsmoke
Copy link

For future users this is my experience:

I faced the same error and the problem was my local volume didn't exist.

version: "3.7"

services:
  mysql-db:
    image: mariadb:10.8
    container_name: mysql-db
    restart: unless-stopped
    tty: true
    ports:
      - "4407:3306"
    environment:
      MYSQL_ROOT_PASSWORD: 12345678
    volumes:
      - ./db:/var/lib/mysql/

the folder ./db did not exist.

after I make the folder, the error has been gone.

@travisbikkle
Copy link

in my case, i ran mysql on a ntfs disk.
i changed it to a ext4 disk and problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

9 participants