Chinaunix

标题: mysql数据库导出求助 [打印本页]

作者: chengxiaowei    时间: 2010-07-27 11:12
标题: mysql数据库导出求助
各位高手好:

最近碰到一个很棘手的问题,如下:
数据库在老的服务器上的版本是mysql-4.1.7

之前的同事用迁移的手段弄到了新的服务器上,安装的mysql版本是5.1.32,我一直升级到5.1.44,数据库工作都正常,我上次升级这台服务器的mysql到5.1.46,结果发现数据库不能使用了。  对应的apache-2.2.15+php-5.3.2          之前正常工作的是apache-2.2.14+mysql-5.1.44+php-5.3.1

因为我有事儿出差,在升级5.1.46后发现网站有问题,就请了另外一个地方的同事帮忙看一下,他看到空间不够,就把老的mysql安装的文件夹还有php的老的安装文件夹全部都打包后移动放到另外一个分区去了,随后问题出现了,我解压缩后恢复到老的分区里面,数据库还是无法使用,我使用如下命令出错。

[root@im /root]# /usr/local/mysql/bin/mysql -u root -p
Enter password:

mysql> use stationary;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Didn't find any fields in table 'angela_Interactive_Media'
Didn't find any fields in table 'jicun_Interactive_Media'
Didn't find any fields in table 'lhong_Interactive_Media'
Didn't find any fields in table 'product'
Didn't find any fields in table 'userinfo'
Database changed
mysql> show tables;
+--------------------------+
| Tables_in_stationary     |
+--------------------------+
| angela_Interactive_Media |
| jicun_Interactive_Media  |
| lhong_Interactive_Media  |
| product                  |
| userinfo                 |
+--------------------------+
5 rows in set (0.00 sec)

mysql> show create table angela_Interactive_Media;
ERROR 1017 (HY000): Can't find file: 'angela_Interactive_Media.MYI' (errno: 2)



随后我尝试了使用mysqldump在老的服务器上导出数据库,也碰到类似的报错
[root@imold /home]# /usr/local/mysql-4.1.7/bin/mysqldump  stationary > /home/yg/staionary.sql
/usr/local/mysql-4.1.7/bin/mysqldump: Got error: 1017: Can't find file: 'angela_Interactive_Media.MYI' (errno: 2) when using LOCK TABLES

在老的服务器上,这个网站是工作正常的,但是我尝试把mysql/var下的内容全部cp到新的服务器上的时候数据还是无法正常显示,导出又不行,请各位高手给点意见,谢谢!
作者: renxiao2003    时间: 2010-07-27 12:16
表的字段已经出现问题了。
作者: chengxiaowei    时间: 2010-07-27 13:31
请问2楼的兄弟,这个有啥办法可以修复吗?

我在老的服务器上也是这个库,可以用的。 但是用在新的服务器上,却不能用了。 谢谢!
作者: strong_sjhi    时间: 2010-07-28 13:53
看看有这个文件么?angela_Interactive_Media.MYI。有的话 check table看看。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2