Brian J.S. Miller wrote:
Hello,
I've read over every archived posting I can find about this problem and havne't found a solution that seems to work for me.
Here is the deal: I had a server crash. Hard. I re-built the server (i686, Debian install, kernel 2.4.18). I restored the data for 1 database from tapes to use for testing purposes.
The database has 76 tables, all of type ISAM.
To restore the data, I did the following: 1) /etc/init.d/mysql stop 2) cp all files from tape restore (ISM, ISD and frm for each of the 76 tables) to /var/lib/mysql/databasename/ 3) chown/chgrp/chmod the new files so they're mysql.root, 0664 4) chown/chgrp/chmod the new directory so it's mysql.root, 0775 5) /etc/init.d/mysql start
The server starts just fine. ~> mysql databasename
I get 66 tables working fine, 9 tables reporting "Didn't find any fields in table 'admin_privs'" (or whatever the table name is..that's just 1 exaple).
Here is what I have tried already: 1) backing down to Mysql 3.23 2) Running 2.6 kernel (read that ISAMs aren't binary compatible across OS/platform) 3) CHECK TABLE admin_privs (says: "Incorrect information in file: './path/admin_privs.frm') 4) isamchk (says: "isamchk: error: 'admin_privs' is not a ISAM-table")
Does anyone have ANY ideas?! I'm at a complete loss here (and, of course, getting bashed for not being able to restore from tape).
Thanks, Brian
Brian, Are the tables ISAM or MYISAM ? From the manual - "MyISAM is the default storage engine as of MySQL 3.23"
If they are MYISAM, then you should be running myisamchk. We run this everytime we start/restart our db which checks for tables not closed properly and will automatically repair them. Of course, read the manual for all the myisamchk options.
walt
#!/bin/bash
FILES=`ls /var/lib/mysql/NEA/*.MYI`
for n in $FILES; do
echo "checking $n";
myisamchk -f -m -O key_buffer=100M -O sort_buffer=64M -O read_buffer=50M -O write_buffer=1M $n;
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]