MySQL临时文件写入失败

Vic*_*sso 7 mysql

运行时ALTER TABLE ... ADD COLUMN ...我得到:

Error Code : 1878
Message    : Temporary file write failure.
Run Code Online (Sandbox Code Playgroud)

以及 log_error (/DATA/mysql/.err)

2016-06-29 17:27:01 7f11f08a7700 InnoDB: Error: Write to file (merge) failed at offset 3145728.
InnoDB: 1048576 bytes should have been written, only 327680 were written.
InnoDB: Operating system error number 0.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 0 means 'Success'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
Run Code Online (Sandbox Code Playgroud)

语境

  • 我在虚拟机上运行 MySQL。访客是SuSE,主机是Windows 7。
  • 删除架构并从转储中重新创建它后出现错误。
  • 一天前我遇到了同样的错误(除了声明是 a create index),它就自发地停止了发生。但这一次它发生了一段时间。
  • 如果我继续重试,日志中写入的字节数每隔一段时间就会变小。

小智 7

磁盘空间可能是根本原因。当 ALTER 运行时,观察 tmpdir 位置中的可用空间。

  • 更改 MySQL 变量“tmpdir”以指向主文件系统中的某个位置。 (2认同)