`
mcj8089
  • 浏览: 190880 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Mysql报错Incorrect key file for table '/tmp/#sql_15cc_14.MYI'; try to repair it解决

阅读更多

本文也可以到我的网站“敲代码”去查看 http://www.qiaodm.com/article/235.shtml

 

今天突然发现程序日志报错Incorrect key file for table '/tmp/#sql_15cc_14.MYI'; try to repair it,Mysql数据库打不开了,网站也挂了,真心着急。查了好多资料,也没搞定,最后汇总各方方案总结出以下的解决办法:

 

1. 查看Mysql日志 /var/log/mysql/error.log 里面有下面的错误

 

130910  9:52:31 [ERROR] /mysql/mysql5.5.24/bin/mysqld: Incorrect key file for table '/tmp/#sql_15cc_14.MYI'; try to repair it
130910  9:52:31 [ERROR] Got an error from unknown thread, /pb2/build/sb_0-5519472-1334854211.98/mysql-5.5.24/storage/myisam/mi_write.c:223

2. 运行命令df -h查看磁盘空间,发现/tmp目录磁盘空间不足,/tmp目录是MYSQL的临时目录,可以在Mysql配置文件/etc/mysql/my.cnf中发现tmpdir = /tmp这一行。

root@AY140706210127235f2dZ:/var/log/mysql# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       20G   12G  6.8G  64% /
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           370M  268K  370M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G     0  1.9G   0% /run/shm
overflow        1M   1024K     0 100% /tmp

3. 上面命令发现/tmp目录没有磁盘空间了,那我就加一些磁盘空间,运行命令mount -t tmpfs -o size=100M none /tmp之后

root@AY140706210127235f2dZ:/var/log/mysql# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       20G   12G  6.8G  64% /
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           370M  268K  370M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G     0  1.9G   0% /run/shm
overflow        100M  176K  100M   1% /tmp
none            100M  176K  100M   1% /tmp

 

4. 重启MYSQL,运行命令 service mysqld restart 完美解决。

 

5. 如果还是起不来Mysql运行命令 /usr/bin/mysqld_safe & 也可以启动

 

分享到:
评论

相关推荐

    8192CU LINUX驱动

    //#define CONFIG_ADAPTOR_INFO_CACHING_FILE // now just applied on 8192cu only, should make it general... //#define CONFIG_RESUME_IN_WORKQUEUE //#define CONFIG_SET_SCAN_DENY_TIMER #define CONFIG_LONG_...

    netapp存储简单操作手册

    netapp存储 simulator/doc/ simulator/doc/3...simulator/doc/faq/ ...simulator/doc/faq/core_file_generation.htm simulator/doc/faq/date_and_time_incorrect.htm simulator/doc/faq/disk_simpull.htm

    sogou_toolchain.tar.gz

    In file included from ./include/alsa/pcm_macros.h:13:0, from ./include/alsa/pcm.h:116, from ./include/alsa/asoundlib.h:48, from record.c:13: /home/rootroot/sogou/toolchain/include/sys/poll.h:1:2: ...

    8-07-14_MegaCLI for linux_windows

    SCGCQ00289585 Defect Command line generated along with press any key in help file operation SCGCQ00315805 Defect Change the UI fro "adpBBucmd getbbumodes a0" command SCGCQ00317547 Defect MegaCLI ...

    mysql导入数据库报错

    mysql导入数据库报错

    mysql报错1033 Incorrect information in file: ‘xxx.frm’问题的解决方法

    问题描述 1.采集站的数据库 2.无数据时搬家没问题,有采集数据后搬家,个别菜单报错 ...5.尝试重新导入sql,注意到了导入时候的报错,查看sql源文件,发现很多语句存在问题 6.既然导出来导进去不行,那

    RBFNN仿真训练程序.rar

    Added info.gam (effective number of parameters) field for rbf_fs_2 and rbf_rr_2 methods. Some typos fixed in manual. Version 2.1 June 15 1999 Fixed some bugs in meth/rbf_fs_2.m. Could cause ...

    SQLPrompt_9.5.0.9311破解版

    Fixed an issue which made it impossible to use the search box in the formatting styles editor for some users. SP-7549 : Fixed an issue that would cause suggestions to break if using USE HINT within ...

    使用Mysql5.x以上版本出现报错#1929 Incorrect datetime value: ”” for column ”createtime”的快速解决方法

    我的MySQL安装后,保存删除表数据总是出现#1929 Incorrect datetime value: ” for column ‘createtime’ 的报错提醒,导致不能删除表里数据; 原因分析: 5以上的版本如果时期时间是空值应该要写NULL; 官方解释说...

    SQLPrompt_7.3.0.564

    Support for formatting scripts containing SQLCMD mode and "GO 10" syntax New format action for adding/removing AS keyword for table/view alias definitions Simplified the parentheses "Place on new line...

    SQLPrompt_7.3.0.651(包含注册机)

    Fix for incorrect indentation when using UNION Fix for missing space in ORDER BY between function call and DESC keyword Fix for extra space being inserted between " Fix for extra space being inserted ...

    unrxlib_275_u_1_0_13

    14/ some functions added into module RxVerInf for better work with versions. Note for users Delphi 5/6/7: ---------------------------- RxLibrary is not directly designed for this Delphi versions. ...

    异常详细信息: EnterpriseDT.Net.Ftp.FTPException: plan/??_SV_201011121502.DNJH: The filename, directory name, or volume label syntax is incorrect

    异常详细信息: EnterpriseDT.Net.Ftp.FTPException: plan/??_SV_201011121502.DNJH: The filename, directory name, or volume label syntax is incorrect

    PB12.5 dw 报错Line 130 Column 487 incorrect syntax问题解决

    PB12.5 dw 报错Line 130 Column 487 incorrect syntax问题解决

    GAMES101-现代计算机图形学学习笔记(作业03)

    实现的投影矩阵填到此处,此时你可以运行 ./Rasterizer output.png normal 来观察法向量实现结果。 3. 修改函数 phong_fragment_shader() in main.cpp: 实现 Blinn-Phong 模型计 算 Fragment Color. 4. 修改函数 ...

    uCOS-II v2.52 在 STM32 上的移植

    2010-08-14(update to v2.3): 1. Rewrite the different part of code into its C file. 2. Drive TIM3 output PWM wave successfully. 3. Add "servo" file, for servo control. 2010-08-19(update to v2.4...

    webwizforums 7.7 SQL 版

    forum_closed.asp - changed so it now redirects to the main forum page if the forum is open 14. RTE_message_form.asp - changed for extra security 15. RTE_textbox.asp - changed for extra ...

    delphixe10 RxLib_For_RX10插件

    Unofficial version Rx library for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3 DISCLAIMER: * This software is provided "as is" and is without warranty of any kind. The author(s) of this software does...

    Hibernate.rar

    hibernate-release-5.0.7.Final Hibernate依赖库: antlr-2.7.7.jar dom4j-1.6.1.jar geronimo-jta_1.1_spec-1.1.1.jar ...mysql-connector-java-5.1.7-bin.jar slf4j-api-1.6.1.jar slf4j-log4j12-1.7.2.jar

Global site tag (gtag.js) - Google Analytics