(Sorry for the double email Simon, forgot to switch the email to text...) Simon Windsor wrote:
> Hi > > The OS is Redhat 7.1 on a dual processor Pentium box, running MySQL 3.23.36, > the standard RedHat version. > > The machine is running two databases, one is a full archive while the other > ones holds current data. The same five records are unavailable using SQL in > the two databases, but using mysqldump I can see the records. > > Obviously the data file is OK, but the index records are corrupt. > > What can I do ? > > - Export the databases, drop originals and reload. > - Drop indexes and rebuild ? > - Repair files ? Which ones, data or index or both ? > > What is advisable and will involve the least work ? First answer these three+ questions: 1) You are /not/ using merge tables, right? And what table-type are you using? InnoDB? MyISAM? ISAM? BDB? 2) Do your records show up if you do something like: echo "SELECT * FROM table" |mysql db |grep "the text you seek" 3) What is the sql you are using to find the data? Is it on a text field with a 'like' clause? Can you include at least the pertinent part of the record and SQL and the column definition as reported by "SHOW TABLE table"? - Export the databases, drop originals and reload. You can use mysqldump and then mysql to rebuild the tables. - Drop indexes and rebuild ? You could do that with alter table drop index... - Repair files ? Which ones, data or index or both ? myisamchk only runs on the index file (.MYI) and does things to the data file when the right options are given. you can try myisamchk -r /path/to/mysqlvar/db/table.MYI to repair the table. There are other options. If "myisamchk table.MYI" reports your table as corrupt, I would try "myisamchk -r table.MYI". If that does not seem to repair it you can "mysqldump -opt db >/tmp/table.sql; mysql db </tmp/table.sql" to rebuild the tables. (You may want to back-up your db files before doing any of this.) b. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php