In questo tutorial PHP imparerete come creare uno script che modifica tutte le tabelle di un database.
< ?php
/*
your connection goes here, example:
mysql_connect("localhost","root","***");
mysql_select_db("db1");
*/
// convert code
$res = mysql_query("SHOW TABLES");
while ($row = mysql_fetch_array($res))
{
foreach ($row as $key => $table)
{
mysql_query("ALTER TABLE " . $table . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci");
echo $key . " – " . $table . " – CONVERTED";
}
}
?>
fonte: www.sastgroup.com





