<?php
$mysql = mysql_connect(MYSQL_HOST,MYSQL_USERNAME,MYSQL_PASSWORD);
if (!$mysql) echo "Failed to connect mysql!";
mysql_select_db(MYSQL_DBNAME,$mysql);
$result = mysql_query("SHOW TABLE STATUS");
while($row = mysql_fetch_row($result))
{
mysql_query("ALTER TABLE " . $row[0] . " CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci");
}
?>
发表回复