- 論壇徽章:
- 0
|
各位高手好:
最近碰到一個很棘手的問題,如下:
數(shù)據(jù)庫在老的服務(wù)器上的版本是mysql-4.1.7
之前的同事用遷移的手段弄到了新的服務(wù)器上,安裝的mysql版本是5.1.32,我一直升級到5.1.44,數(shù)據(jù)庫工作都正常,我上次升級這臺服務(wù)器的mysql到5.1.46,結(jié)果發(fā)現(xiàn)數(shù)據(jù)庫不能使用了。 對應(yīng)的apache-2.2.15+php-5.3.2 之前正常工作的是apache-2.2.14+mysql-5.1.44+php-5.3.1
因為我有事兒出差,在升級5.1.46后發(fā)現(xiàn)網(wǎng)站有問題,就請了另外一個地方的同事幫忙看一下,他看到空間不夠,就把老的mysql安裝的文件夾還有php的老的安裝文件夾全部都打包后移動放到另外一個分區(qū)去了,隨后問題出現(xiàn)了,我解壓縮后恢復(fù)到老的分區(qū)里面,數(shù)據(jù)庫還是無法使用,我使用如下命令出錯。
[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在老的服務(wù)器上導(dǎo)出數(shù)據(jù)庫,也碰到類似的報錯
[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
在老的服務(wù)器上,這個網(wǎng)站是工作正常的,但是我嘗試把mysql/var下的內(nèi)容全部cp到新的服務(wù)器上的時候數(shù)據(jù)還是無法正常顯示,導(dǎo)出又不行,請各位高手給點意見,謝謝! |
|