I have previously saved a copy of /var/lib/mysql/ddms directory ("ddms" is the DB name). Now I installed a new MySQL on a freshly installed Ubuntu 10.04.3 LTS by running
apt-get install mysql-server, I believe version 5.1 was installed. After I copy the ddms directory under /var/lib/mysql, some of its tables work fine, these are the tables with an associated set of three files: a .frm file, a .MYD file and a .MYI file.
However, there are two tables with a different set of files: a .frm file and a .ibd file. These two tables didn't show up in the table list in phpMyAdmin. When I look at the error log, it says:
[ERROR] Cannot find or open table ddms/dictionary_item from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support.
Please help with restoring these two tables. Thanks.