InnoDB tables cannot be copied the same way that MyISAM tables can.
Just copying the .frm and .ibd files from one location to another is asking for trouble. Copying the .frm and .ibd file of an InnoDB table is only good if and only if you can guarantee that the tablespace id of the .ibd file matches exactly with the tablespace id entry in the metdata of the ibdata1 file.
I wrote two posts in DBA StackExchange about this tablespace id concept
Here is excellent link on how to reattach any .ibd file to ibdata1 in the event of mismatched tablespace ids : http://www.chriscalender.com/?tag=innodb-error-tablespace-id-in-file. After reading this, you should come to the immediate realization that copying .ibd files is just plain crazy.
You could apply the suggestions from the Chris Calendar link, or you could go back to the old installation of mysql, startup up mysql, and then mysqldump the ddms
database. Then, import that mysqldump into your new mysql instance. Trust me, this would be far easier.
ANSWER #1
This feels clumsy doing this in Windows but here it goes. If you are able to login to mysql, then run this script
set MYSQL_USER=root
set MYSQL_PASS=rootpassword
set SQLSTMT=SELECT CONCAT('REPAIR TABLE ',table_schema,'.',table_name,';')
set SQLSTMT=%SQLSTMT% FROM information_schema.tables WHERE engine='InnoDB'
set MYSQL_CONN=-u%MYSQL_USER% -p%MYSQL_PASS%
echo %SQLSTMT%
mysql %MYSQL_CONN% -ANe"%SQLSTMT%" > C:\windows\InnoDBCheck.sql
After you run this script, add this to my.ini
[mysqld]
init-file=C:\windows\InnoDBCheck.sql
Then, restart mysql
net stop mysql
met start mysql
during the startup, just after crash recovery, the
Forgive me for such a crude solution since I have very little dealing with MySQL for Windows (that's not sarcasm, I am serious).
ANSWER #2
Here is something more serious
I just checked my MySQL 5.6.10 no-install ZIP file. It has innochecksum.
C:\>dir \MySQL_5.6.10\bin\i*
Volume in drive C has no label.
Volume Serial Number is 2C92-485B
Directory of C:\MySQL_5.6.10\bin
01/22/2013 07:05 PM 4,065,792 innochecksum.exe
01/22/2013 07:05 PM 3,706,880 innochecksum.pdb
2 File(s) 7,772,672 bytes
0 Dir(s) 160,596,770,816 bytes free
C:\>
Download that ZIP and try running that .
You could then collect all the .ibd
files with something like this:
cd "C:\Program Files\MySQL\MySQL 5.5\data"
dir *.ibd /s/b > C:\ibdfiles.bat
You can then edit C:\ibdfiles.bat
and prepend innochecksum against every filename.
Sorry this is not a full answer, but at least you can a hold of innochecksum.exe
Best Answer
Your problem is to maintain two sessions
.ibd
fileNote the Following
.ibd
fileSteps to Perform
This gives Session #2 25 seconds to copy the
.ibd
fileHere is the Windows BAT file
GIVE IT A TRY !!!
Note : You can change
TIME_TO_SLEEP
andTIME_TO_PAUSE
if it takes more than 30 Seconds to copy