When you see an error like,
=-=-
Warning: mysql_fetch_array() expects parameter 1 to be resource
=--=
you can check the db using the command mysqlcheck -c <dbname>
If you see that the table does not exist, take a backup of database.
cp -pr /var/lib/mysql/<dbname> /var/lib/mysql/<dbname>.bak_$(date +%d-%m-%y)
Then delete the database. If the deletion of database fails, go to the database folder ,
/var/lib/mysql/ <dbname> ,
ls
rm -rf *.*
mysqladmin drop <dbname>
mysqladmin create <dbname>
mysql <dbname> < /backup/cpbacup/monthly/<acct name>/mysql
Verify the database using the command ,
mysqlcheck -c <dbname>
Done
=-=-
Warning: mysql_fetch_array() expects parameter 1 to be resource
=--=
you can check the db using the command mysqlcheck -c <dbname>
If you see that the table does not exist, take a backup of database.
cp -pr /var/lib/mysql/<dbname> /var/lib/mysql/<dbname>.bak_$(date +%d-%m-%y)
Then delete the database. If the deletion of database fails, go to the database folder ,
/var/lib/mysql/ <dbname> ,
ls
rm -rf *.*
mysqladmin drop <dbname>
mysqladmin create <dbname>
mysql <dbname> < /backup/cpbacup/monthly/<acct name>/mysql
Verify the database using the command ,
mysqlcheck -c <dbname>
Done