Pages

Friday, June 10, 2011

MYSQL :HOW YOU CAN USE INFORMATION_SCHEMA TO BUILD COMMANDS TO SEND BACK TO MYSQL;


HOW YOU CAN USE INFORMATION_SCHEMA TO BUILD COMMANDS TO SEND BACK TO MYSQL;


shell> mysql -N -e "select CONCAT('REPAIR TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') FROM information_schema.tables WHERE ENGINE='MyISAM' AND TABLE_SCHEMA!='mysql' AND TABLE_SCHEMA!='information_schema';" | mysql -uuser -ppassword