Category Archives: Mysql

mysql in linux


This error comes and mysql server is rebooted dues to a power failure of any unplanned shutdown. If you try to start mysql service you will get the same error in mysql error log. The solution is to go to the mysql data directory and move the logs ( ib_logfile0, ib_logfile1 etc) file to a temporary location. …

Read more

Convert MyISAM Tables to InnoDB

If you want to convert all MyISAM tables to InnoDB, following Script will do the smae. #!/bin/bash DBNAME=””; DBUSER=””; DBPASS=””; for t in $(mysql -u$DBUSER -p$DBPASS –batch –column-names=false -e “show tables” $DBNAME); do echo “Converting table $t”; mysql -u$DBUSER -p$DBPASS -e “alter table ${t} type=InnoDB” $DBNAME; echo “Repair table $t”; mysql -u$DBUSER -p$DBPASS -e “repair …

Read more