BLACK FRIDAY DEALS

Knowledge Base

Allows you to search a variety of questions and answers

Search

Search results

MySQL

To do this, you will need to stop your httpd server and then run the following script:
 

Code:

#/bin/bash
#script to convert the whole database to innodb format.
cp -iRfp /var/lib/mysql /var/lib/mysql-$(date +%s)
for mydatabase in $(mysql --batch --column-names=false -e "show databases");
do
for t in $(mysql --batch --column-names=false -e "show tables" $mydatabase);
do
mysql -e "alter table $t type=InnoDB" $mydbname;
echo "converted "$t" to innodb"
done
done

Save it to a file and then execute it. Just make sure to make a backup before hand. Replace 'InnoDB' with MyISAM if you want to switch to MyISAM. Also replace 'mydatabase' and 'mydbname' with the name of the actual database that you want this done to.

See What Our Customers Say

Leave review
V

Valentine

PEMBROKESHIRE, United Kingdom

AYKSolutions is thee best hosting solution I have found in 10 years of searching. I'm very grateful...

Read full review
J

James

FL, United States

I have been using AYK for about 2 years now and they are always on top of any issues I have. They ha...

Read full review
J

Jose E

ON, Canada

I very seldom contact support, but if I do, the response is always prompt and issues are always res...

Read full review
V

Valentine J

Dale, United Kingdom

Great host, have tried many they're certainly a top choice for me. Premium bandwidth, great prices,...

Read full review
ARIN Cisco Supermicro cPanel Intel Microsoft