If you have ssh access to the server you can use the following script to change the collation of the database.
Quote:
<?php
$db = mysql_connect('localhost','database_user','passwor d');
if(!$db) echo "Unable to connect to the database - incorrect details";
mysql_select_db('database_name'); $result=mysql_query('show tables');
while($tables = mysql_fetch_array($result)) {
foreach ($tables as $key => $value) {
mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");
}}
echo "The collation of your database has been successfully changed!";
?>
|
The above script will change the collation to 'utf8_general_ci'.
Also if you have ssh access to the server , you can optimize and repair the database using the following commands respectively.
Quote:
mysqlcheck -o database_name
mysqlcheck -r database_name
|
