mysql教程 修復數據庫教程實例
Alter DATABASE [dvbbs] SET SINGLE_USER
GO
DBCC CHECKDB(’dvbbs’,repair_allow_data_loss) WITH TABLOCK
GO
Alter DATABASE [dvbbs] SET MULTI_USER
GO
使用php教程myadmin修復的過程中造成了原有數據全部丟失。在把備份恢復後,使用了myisamchk來進行修復。最後數據庫修復成功
www# myisamchk -r -B pw_posts.MYI
- recovering (with sort) MyISAM-table ‘pw_posts.MYI’
Data records: 1
- Fixing index 1
- Fixing index 2
- Fixing index 3
- Fixing index 4
- Fixing index 5
- Fixing index 6
Data records: 259889