Dockerにて、下記のエラーによりMariaDBが起動しない時の対処した方法です。
[Warning] InnoDB: Failed to set O_DIRECT on file ./ibdata1: OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs
[ERROR] Plugin 'InnoDB' init function returned error.
mariadb_1
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mariadb_1
[Note] Plugin 'FEEDBACK' is disabled.
mariadb_1
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
mariadb_1
[ERROR] Unknown/unsupported storage engine: InnoDB
mariadb_1
[ERROR] Aborting
docker-compose.ymlを修正することで解決
docker-compose.yml
mariadb:
build: ./mariadb
volumes:
- ./mariadb/data:/var/lib/mysql
ports:
- 3306:3306
↓↓↓↓↓↓↓
docker-compose.yml
mariadb:
build: ./mariadb
volumes:
- ./mariadb/data:/var/lib/mariadb #変更
ports:
- 3306:3306
/var/lib/mysql
を/var/lib/mariadb
に変更することでMariaDBを起動することができました。