寻觅生命中的那一片浅草......

Got error 28 from storage engine 解决方法

今天碰到数据库出错

Got error 28 from storage engine

查了一下,数据库文件所在的盘应该没事,应该是数据库用的临时目录空间不够

引用
磁盘临时空间不够导致。
解决办法:
清空/tmp目录,或者修改my.cnf中的tmpdir参数,指向具有足够空间目录

上面的说法应该比较清楚,还有一个类似的:

引用
mysql报以下错的解决方法

ERROR 1030 (HY000): Got error 28 from storage engine

出现此问题的原因:临时空间不够,无法执行此SQL语句

解决方法:将tmpdir指向一个硬盘空间很大的目录即可

原创内容如转载请注明:来自 阿权的书房
本帖地址:http://www.aslibra.com/blog/read.php/794.htm

Rm -rf 磁盘空间未释放

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|注意事项:如欲转载,请保留以下信息。谢谢
|文章出处:http://hi.baidu.com/_wang8
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
rm -rf 之后,文件未必是立即就被删除了..
还需要等占用此文件的进程将文件释放后,文件才开始执行删除操作。

rm -rf access_log
cat >access_log
rm -rf error_log
cat >error_log

[root@ccsafe local]# df -h
文件系统              容量 已用 可用 已用% 挂载点
/dev/sda1              99G 3.4G   91G   4% /
/dev/sdb1             276G 249G   13G 96% /data
none                  2.0G 4.0K 2.0G   1% /dev/shm
/dev/sda3             167G 155G 3.4G 98% /usr/local

[root@ccsafe local]# du -h –max-depth=1 /usr/local/
92K     /usr/local/page_creater
136M    /usr/local/virus_info_svr
940K    /usr/local/lib
140K    /usr/local/share
8.0K    /usr/local/include
76K     /usr/local/sbin
36K     /usr/local/virus
8.0K    /usr/local/games
8.0K    /usr/local/src
44K     /usr/local/conf
24K     /usr/local/man
276K    /usr/local/monitor-base
4.9G    /usr/local/mysql
76K     /usr/local/etc
8.0K    /usr/local/data
24M     /usr/local/snmpd
8.0K    /usr/local/libexec
1.2M    /usr/local/external_lib
16K     /usr/local/lost+found
15M     /usr/local/bin
72K     /usr/local/doc
42M     /usr/local/apache2
5.1G    /usr/local/
[root@ccsafe local]#
[root@ccsafe local]# /usr/local/apache2/bin/apachectl stop
httpd (no pid file) not running
[root@ccsafe local]# df -h
文件系统              容量 已用 可用 已用% 挂载点
/dev/sda1              99G 3.4G   91G   4% /
/dev/sdb1             276G 249G   13G 96% /data
none                  2.0G 4.0K 2.0G   1% /dev/shm
/dev/sda3             167G 130G   29G 82% /usr/local
[root@ccsafe local]# df -h
文件系统              容量 已用 可用 已用% 挂载点
/dev/sda1              99G 3.4G   91G   4% /
/dev/sdb1             276G 249G   13G 96% /data
none                  2.0G 4.0K 2.0G   1% /dev/shm
/dev/sda3             167G   88G   71G 56% /usr/local
[root@ccsafe local]# df -h
文件系统              容量 已用 可用 已用% 挂载点
/dev/sda1              99G 3.4G   91G   4% /
/dev/sdb1             276G 249G   13G 96% /data
none                  2.0G 4.0K 2.0G   1% /dev/shm
/dev/sda3             167G 5.2G 154G   4% /usr/local
[root@ccsafe local]#

可以这样来检测:
[root@ccsec ~]# lsof |grep deleted
cat       8036 root    1w      REG      253,0        5     483189 /root/aaa.txt (deleted)
[root@ccsec ~]#

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match

此错误主要是想找Linux内核的包含头文件找不到。要解决此问题需要安装内核源代码。

确认已安装
kernel-devel
kernel-hearders
这2个包

1. 首先要查看内核版本号:
【root@localhost ~】# uname -r // 查看内核版本号或者uname –a
如果是RHEL5的话内核应该是 2.6.18-8.el5xen
2. 已经知道自己的内核是“2.6.18-8.el5xen”,可以去此网站
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.8.tar.gz 下载到符合自己系统的内核源码。
3. 用【root@localhost ~】#tar zxvf linux-2.6.16.8.tar.gz -C /usr/src
将文件解压到指定目录/usr/src。
4. 进入/usr/src目录下,用【root@localhost ~】#mv linux-2.6.18.8 linux将解压好的文件夹名“linux-2.6.18.8”改变成“linux”。
5. 进入/usr/src/linux目录下。分别运行:
make mrproper
make oldconfig
make
执行第二个命令时碰到提示一路回车就行,第三个命令如果要完全执行完的话,可能会需要几个小时,最好让它编译完毕之后,再装虚拟机工具。如果在make刚开始执行时,即使生成了version.h和utsrelease.h,若按Ctrl+C强行退出编译。在安装完VM-ware Tools后,很可能导致系统无法正常启动。
6. 编译完毕后,进入/usr/src/linux/include/linux,用【root@localhost ~】#vi utsrelease.h (按i是插入,修改完后按Esc,然后按Shift+:,输入wq!按回车,修改完毕可以用#more utsrelease.h查看是否修改成功)将里面的版本号改成2.6.18-8.el5xen。
同上再修改version.h,在原来的基础上增加一行#define UTS_RELEASE “2.6.18-8.el5xen”,保存退出。
7. 重新启动系统,如果不重启,在安装VM-ware Tools后可能会碰到一些问题
8. 重启后就可以正常安装VM-ware Tools了。
9. 假如要改变分辨率,运行/usr/bin/vmware-config-tools.pl即可修改。

Windows下mysqlimport批量txt文件

在Linux上把MySQL库导出为sql和txt,在Linux上是很容易导入

mysql -u root -ppassword dbname < db_struc.sql

mysqlimport –local -uroot -ppassword dbname `find . -name “*.txt”`

Windows下麻烦了,没有find,又不支持*.txt

后来想到办法,建了个bat文件

用替换的方法将文件修改为

mysqlimport -uroot -ppassword dbname d:\dump\table1.txt

mysqlimport -uroot -ppassword dbname d:\dump\table2.txt

进入cmd
c:
cd “\Documents and Settings\user\桌面\test_2011-03-10\2011-03-10”
创建数据库test
“F:\Program Files\xampp\xampp\mysql\bin\mysql.exe” -uroot -pmanypassword
CREATE DATABASE IF NOT EXISTS test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
exit

导入数据结构
“F:\Program Files\xampp\xampp\mysql\bin\mysql.exe” -uroot -pmanypassword test < test_db_struc.sql
获取所有表的txt文件名
dir /b *.txt > c:\import.bat
现在的格式是
test_data.txt
test_data_a.txt

然后用editplus打开,替换成这样的格式
“F:\Program Files\xampp\xampp\mysql\bin\mysqlimport.exe” –local -uroot -pmanypassword test test_data.txt
“F:\Program Files\xampp\xampp\mysql\bin\mysqlimport.exe” –local -uroot -pmanypassword test test_data_a.txt

把import.bat放到c:\Documents and Settings\user\桌面\test_2011-03-10\2011-03-10
执行,数据就导进去了

mysql_drop_user错误

mysql> drop user ‘test_s99’@’%’;
ERROR 1268 (HY000): Can’t drop one or more of the requested users

revoke all on test_s99.* from ‘test_s99’@’localhost’;
drop user ‘test_s99’@’localhost’;

The DROP USER statement removes one or more MySQL accounts. To use it, you must have the DELETE privilege for the mysql database. Each account is named using the same format as for the GRANT  statement; for example, ‘jeffrey’@’localhost’. If you specify only the user name part of the account name, a host name part of ‘%’ is used. For additional information about specifying account names, see Section 12.5.1.2, “GRANT Syntax”.

DROP USER was added in MySQL 4.1.1. In MySQL 4.1, it serves only to remove account rows from the user table for accounts that have no privileges. To remove a MySQL account completely (including all of its privileges), you should use the following procedure, performing the steps in the order shown:

1.

Use SHOW GRANTS to determine what privileges the account has. See Section 12.5.5.12, “SHOW GRANTS Syntax”.
2.

Use REVOKE to revoke the privileges displayed by SHOW GRANTS. This removes rows for the account from all the grant tables except the user table, and revokes any global privileges listed in the user table. See Section 12.5.1.2, “GRANT Syntax”.
3.

Delete the account by using DROP USER to remove the user table row.

In MySQL 5.0.2 and up, DROP USER removes the account row in the user table and also revokes the privileges held by the account. It is not necessary to use DROP USER in conjunction with REVOKE.
Important

DROP USER does not automatically close any open user sessions. Rather, in the event that a user with an open session is dropped, the statement does not take effect until that user’s session is closed. Once the session is closed, the user is dropped, and that user’s next attempt to log in will fail. This is by design.

Before MySQL 4.1.1, DROP USER is not available. You should first revoke the account privileges using SHOW GRANTS and REVOKE as just described. Then delete the user table row and flush the grant tables as shown here:

http://dev.mysql.com/doc/refman/4.1/en/drop-user.html

2025年七月
« 5月    
 123456
78910111213
14151617181920
21222324252627
28293031