Error writing file '/tmp/MLLGyECY' (Errcode: 28 - No space left on device)


mysql 的一個從庫報錯:

Could not execute Write_rows event on table xxx.xxxx_tmp_tj; Error writing file '/tmp/MLLGyECY' (Errcode: 28 - No space left on device), Error_code: 3; Error writing file 'mysql-bin' (errno: 28 - No space left on device), Error_code: 1026; Writing one row to the row-based binary log failed, Error_code: 1534; handler error HA_ERR_RBR_LOGGING_FAILED; the event's master log mysql-bin.003482, end_log_pos 119034357
Replicate_Ignore_Server_Ids:

df -h 查看 /tmp 目錄6.3G,應該是大事務導致需要很大的臨時空間,導致6.3G不夠用。所以報錯。

修改my.cnf, 在 [mysqld] 下面加上配置項:

tmpdir = /data/tmp 

重啟mysqld.

  解決問題。

 官網文檔 關於 tmpdir 的說明:

The path of the directory to use for creating temporary files. It might be useful if your default /tmp directory resides on a partition 
that is too small to hold temporary tables. This option accepts several paths that are used in round-robin fashion. Paths should be 
separated by colon characters (:) on Unix and semicolon characters (;) on Windows. If the MySQL server is acting as a replication slave, 
you should not set --tmpdir to point to a directory on a memory-based file system or to a directory that is cleared when the server host 
restarts. For more information about the storage location of temporary files, see Section B.5.3.5, “Where MySQL Stores Temporary Files”. 
A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables or LOAD DATA
 INFILE operations. If files in the temporary file directory are lost when the server restarts, replication fails.

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM