I found problems with Docker Machine users on Windows 10 to have the following error at container creation time
[ERROR] InnoDB: Operating system error number 22 in a file operation.
[ERROR] InnoDB: Error number 22 means 'Invalid argument'
[ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
I even mount the "data/db" folder to the internal mysql docker container folder "/docker-entrypoint-initdb.d" to enable auto import if there is any SQL file (like a backup).
read more at https://hub.docker.com/_/mysql/ at "Initializing a fresh instance" paragraph
The database files are not anymore visible under "data/db" because the named volume is only internally monuted inside the mysql container.
Obviously the database can still be access via WP CLI or PhpMyAdmin.
I found problems with Docker Machine users on Windows 10 to have the following error at container creation time
To solve that, I mount the db data to a named volume, in this way a
docker-compose down
won't destroy data, unless you use the-v
option https://docs.docker.com/compose/reference/down/I even mount the "data/db" folder to the internal mysql docker container folder "/docker-entrypoint-initdb.d" to enable auto import if there is any SQL file (like a backup). read more at https://hub.docker.com/_/mysql/ at "Initializing a fresh instance" paragraph
The database files are not anymore visible under "data/db" because the named volume is only internally monuted inside the mysql container. Obviously the database can still be access via WP CLI or PhpMyAdmin.