本文也可以到我的网站“敲代码”去查看 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 & 也可以启动
相关推荐
在MySQL数据库管理中,"Incorrect key file for table" 是一种常见的错误信息,它通常表示某个数据表的索引文件可能已经损坏或不匹配。这种问题可能是由于硬盘故障、不正常的数据库关闭、复制过程中数据损坏等原因...
//#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_...
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: ...
问题描述 1.采集站的数据库 2.无数据时搬家没问题,有采集数据后搬家,个别菜单报错 ...5.尝试重新导入sql,注意到了导入时候的报错,查看sql源文件,发现很多语句存在问题 6.既然导出来导进去不行,那
在处理MySQL数据库导入操作时,遇到“ERROR 1102(42000) at line 160: Incorrect database name 'ʡ(һѵ)'”这一错误信息是较为常见的问题,尤其是在字符集不匹配的情况下。此错误通常表明在尝试创建或访问数据库时...
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中的`tmp_table_size`参数是用来设定在内存中创建的临时表的最大大小。临时表通常在执行复杂的SQL查询,如JOIN、GROUP BY、DISTINCT等操作时生成,以辅助数据处理。当`tmp_table_size`设置得较低时,如果查询...
3. There is no point in arguing about it, because it is ______ a question of procedure. 4. The ______ of working process freed the workers from heavy labor. **答案**: simple; simplified; simply; ...
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 ...
在MySQL 5.x及以上版本中,用户可能会遇到错误#1929,提示"Incorrect datetime value: '' for column 'createtime'"。这个错误通常出现在尝试插入或更新包含日期时间值的列时,如果该列的值为空,而数据库配置不允许...
异常详细信息: EnterpriseDT.Net.Ftp.FTPException: plan/??_SV_201011121502.DNJH: The filename, directory name, or volume label syntax is incorrect
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 ...
在PowerBuilder 12.5(简称PB12.5)开发过程中,遇到“Line 130 Column 487 incorrect syntax”错误是一种常见的编程问题。这种错误通常出现在数据窗口(DataWindow,简称DW)对象的编译阶段,提示在指定的行号和列...
1. **错误代码:530 Login incorrect.** **解决方法**:检查虚拟用户的家目录是否正确配置。 ```bash # vi /etc/passwd virtual:x:1001:1001::/home/ftpsite:/bin/bash ``` 2. **错误代码:500 OOPS: ...
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...
这个错误信息 "Incorrect datetime value: '' for column 'createtime'" 指出,你试图向名为 'createtime' 的日期时间类型列插入一个空字符串 '',而MySQL无法接受这种格式的空值。在MySQL 5.x及以上版本,特别是当...
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 ...
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. ...