2.8.1.3. Converting storage of all tables
Requirements: PHP 5+
To convert all tables, you can torun a script that will execute an SQL query for each individual table.
<?php 'host' => 'example.mysql.tools', 'user' => 'example_db', 'password' => 'xxxxxxxxxx', 'database' => 'example_db', 'engine' => 'InnoDB' ); $sql = "SHOW TABLES"; if (mysqli_query($link, "ALTER TABLE `".$row['Tables_in_'.$DB['database']]."` ENGINE = ".$DB['engine'])) { echo $row['Tables_in_'.$DB['database']]." ok<br>"; } else { echo $row['Tables_in_'.$DB['database']]." error<br>"; } }
In the script you need to specify connection data to the database:
host
— database server.user
— the name of the database user.password
— database user password.database
— the name of the database.engine
— the target storage type to which all tables will be changed.
Alternative ways of changing the storage type are described here.