Mysql 文件。/ib_logfile101:&x27;aio写入';返回操作系统错误122

Mysql 文件。/ib_logfile101:&x27;aio写入';返回操作系统错误122,mysql,ubuntu,ubuntu-12.04,aio,Mysql,Ubuntu,Ubuntu 12.04,Aio,我正在尝试在Ubuntu 12.04桌面上安装MySQL 5.6.14: $ scripts/mysql_install_db --no-defaults --force \ --explicit_defaults_for_timestamp --datadir=/tmp/data 我得到: Installing MySQL system tables... 2013-10-09 09:27:26 6463 [Warning] Buffered warning: Changed limit

我正在尝试在Ubuntu 12.04桌面上安装MySQL 5.6.14:

$ scripts/mysql_install_db --no-defaults --force \
  --explicit_defaults_for_timestamp --datadir=/tmp/data
我得到:

Installing MySQL system tables...
2013-10-09 09:27:26 6463 [Warning] Buffered warning: Changed limits: max_open_files: 4096 (requested 5000)
2013-10-09 09:27:26 6463 [Warning] Buffered warning: Changed limits: table_cache: 1967 (requested 2000)
2013-10-09 09:27:26 6463 [Note] InnoDB: The InnoDB memory heap is disabled
2013-10-09 09:27:26 6463 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-10-09 09:27:26 6463 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-10-09 09:27:26 6463 [Note] InnoDB: Using Linux native AIO
2013-10-09 09:27:26 6463 [Note] InnoDB: Not using CPU crc32 instructions
2013-10-09 09:27:26 6463 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-10-09 09:27:26 6463 [Note] InnoDB: Completed initialization of buffer pool
2013-10-09 09:27:26 6463 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2013-10-09 09:27:26 6463 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2013-10-09 09:27:26 6463 [Note] InnoDB: Database physically writes the file full: wait...
2013-10-09 09:27:26 6463 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2013-10-09 09:27:30 6463 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2013-10-09 09:27:31 7fdc6d10b740  InnoDB: Operating system error number 22 in a file operation.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
2013-10-09 09:27:31 6463 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation

这可能是什么?如何解决?

这意味着您使用的文件系统不支持aio。通过在my.cnf中添加以下行,您可以向innodb说明这一点:

innodb_use_native_aio=0

有了my.cnf,MySQL应该可以启动了

上述解决方案对我不起作用。所以,我在docker compose中添加了以下命令作为命令

command: "--innodb_use_native_aio=0"
而且它有效

检查这个答案