【MySQL】ERROR 1878 (HY000): Temporary file write failure.
【MySQL】ERROR 1878 (HY000): Temporary file write failure.
報錯:
root@localhost[business_db_jingbain]> ALTER TABLE sensor ADD CONSTRAINT pk_sensor_id PRIMARY KEY(id);
ERROR 1878 (HY000): Temporary file write failure.
原因預設tmp空間不夠。
tmpdir系統變數,官方文件參考:
處理方法:
[root@s110732 ~]
# vim /etc/my.cnf #把tmpdir設定到 /data/tmp | |
[root@s110732 ~]
# mkdir -p /data/tmp | |
[root@s110732 ~]
# service mysqld restart | |
Shutting down MySQL..... SUCCESS! | |
Starting MySQL. ERROR! The server quit without updating PID file | |
[root@s110732 ~]
# chown -R mysql:mysql /data/tmp | |
[root@s110732 ~]
# service mysqld restart | |
ERROR! MySQL server PID file could
not be found! | |
Starting MySQL.. SUCCESS! |
MSYQL在執行查詢語句時報出以下錯誤:
ERROR 3(HY000):Error writing file 'tmp/MY1yjZEI'(Errcode:28)
看了下/tmp所在目錄的磁碟情況,發現0%剩餘,解決方法是更換MYSQL的tmp目錄或清理/tmp目錄,本次選擇更換目錄。步驟如下
1.修改配置檔案/etc/my.cnf,在[mysqld]區塊下新增如下配置:
tmpdir=/mnt/sdc/mysql_tmp
2.為新增的臨時檔案目錄授予可寫許可權,確保能夠正確寫入
chmod a+w /mnt/sdc/mysql_tmp
3.重啟MYSQL服務
service mysql restart
About Me
........................................................................................................................ ● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除 ● 本文在itpub、部落格園、CSDN和個人微 信公眾號( xiaomaimiaolhr)上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文部落格園地址: http://www.cnblogs.com/lhrbest ● 本文CSDN地址: https://blog.csdn.net/lihuarongaini ● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA寶典今日頭條號地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● QQ群號: 230161599 、618766405 ● 微 信群:可加我微 信,我拉大家進群,非誠勿擾 ● 聯絡我請加QQ好友 ( 646634621 ),註明新增緣由 ● 於 2019-12-01 06:00 ~ 2019-12-31 24:00 在西安完成 ● 最新修改時間:2019-12-01 06:00 ~ 2019-12-31 24:00 ● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店: https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麥苗出版的資料庫類叢書: http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麥苗OCP、OCM、高可用網路班: http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麥苗騰訊課堂主頁: https://lhr.ke.qq.com/ ........................................................................................................................ 使用 微 信客戶端掃描下面的二維碼來關注小麥苗的微 信公眾號( xiaomaimiaolhr)及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。
........................................................................................................................ |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2669699/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL 報錯 ERROR 1290 (HY000): running with the --secure-file-privMySqlError
- 【MySQL】ERROR 1290 (HY000): --secure-file-priv--匯出報錯MySqlError
- ERROR 1290 (HY000): The MySQL server is running withErrorMySqlServer
- Mysql連線錯誤ERROR 2003 (HY000)MySqlError
- MySQL報錯ERROR 2013 (HY000): Lost connection to MySQL server during queryMySqlErrorServer
- ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization paErrorMySqlServer
- ERROR 2026 (HY000): SSL connection error: unknown error numberError
- ftp_rawlist: Unable to create temporary file.FTP
- 阿里雲mysql遠端登入報ERROR 2027(HY000)阿里MySqlError
- ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables optErrorMySqlServer
- ERROR 1114 (HY000) The table '' is fullError
- MySQL5.7叢集(MGR)啟動報ERROR 3092 (HY000)MySqlError
- MySQL案例02:ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGESMySqlError
- MySQL 使用 show tables 時出現 ERROR 1449 (HY000) 問題MySqlError
- docker mysql mysqld: Error on realpath() on ‘/var/lib/mysql-files‘ No such file or directoryDockerMySqlError
- ERROR 1290:The MySQL server is running with the --secure-file-priv optionErrorMySqlServer
- mysql 5.6.25報錯ERROR 1372 (HY000): Password hash 的一點思考MySqlError
- mysql無法建立儲存過程問題 ERROR 1307 (HY000)MySql儲存過程Error
- Error!: SQLSTATE[HY000] [2002] Connection refusedErrorSQL
- MySQL double writeMySql
- MySQL 5.7 建立使用者報錯 ERROR 1805 (HY000): Column count of mysql.user is wrongMySqlError
- Centos7-mysql執行報錯ERROR1820(HY000):YoumustresetyourpasswordusingALTERUSERstatementbeforeexecutingthisstatement.CentOSMySqlError
- Linux:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannLinuxErrorMySqlServer
- ERROR 1290 (HY000) 解決辦法Error
- other 1878
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- 解決ERROR 1030 (HY000): Got error 168 from storage engine apparmorErrorGoAPP
- I/O上的等待事件 —— control file sequential read/control file parallel write事件Parallel
- mysql 8 報錯 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryMySqlErrorAIStruct
- mysql錯誤詳解(1819):ERROR 1819 (HY000): Your password does not satisfy the current policy requirementsMySqlErrorUIREM
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- Solaris syntax error: unexpected end of fileError
- ERROR 1786 (HY000): Statement violates GTID consistency: CREATE TABLE ... SELECTError
- 【MySQL】八、double write 淺析.MySql
- MySQL double write存在意義MySql
- Binary XML file line #2: Error inflatingXMLError
- psql: error: could not connect to server: No such file or directorySQLErrorServer
- 【TUNE_ORACLE】等待事件之日誌等待“log file parallel write”Oracle事件Parallel