Using Docker Toolbox in macOS 10.11. Trying to start Percona 5.7 container via docker-compose:
percona:
image: percona:5.7
user: "1000:50"
restart: "no"
volumes:
- ./db:/var/lib/mysql:rw
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: qwerty
But when run:
docker-compose up
it shows me this log:
percona_1 | Initializing database
percona_1 | 2018-02-27T18:21:40.471171Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
percona_1 | 2018-02-27T18:21:40.471336Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
percona_1 | 2018-02-27T18:21:40.509126Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
percona_1 | 2018-02-27T18:21:40.511757Z 0 [Warning] One can only use the --user switch if running as root
percona_1 |
percona_1 | 2018-02-27T18:21:42.900823Z 0 [ERROR] InnoDB: Operating system error number 22 in a file operation.
percona_1 | 2018-02-27T18:21:42.901071Z 0 [ERROR] InnoDB: Error number 22 means 'Invalid argument'
percona_1 | 2018-02-27T18:21:42.901164Z 0 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
percona_1 | 2018-02-27T18:21:42.901187Z 0 [ERROR] InnoDB: Cannot continue operation.
docker_percona_1 exited with code 3
Can you help me understand the problem?
It means the filesystem your using doesn't support aio. You can tell this to innodb by adding the following line to my.cnf:
innodb_use_native_aio=0
also remove innodb_flush_method = O_DIRECT if enabled in my.cnf