Stratos Gerakakis

Migrating greek table from mysql < 4.1

Tagged as: linux  cli  mysql 

Jun 17 2006

I do not remember how the tables were transferred from the old DB to the new (more likely through a mysqldump).

The end effect was that the tables in the 4.1 MySql Db had a collation of latin1_swedish_ci.

After backing up the affected tables, do::

ALTER TABLE pfl_links_prot
MODIFY category blob,
MODIFY comments blob;

ALTER TABLE pfl_links_prot
MODIFY category varchar(20) character set greek,
MODIFY comments text character set greek;

Just make sure you return the column type at exactly what was before you made it a blob.

Now the columns should have a collation of greek_general_ci

Furthermore, in case the php scripts gives you trouble loading the new rows, try something like:

$MySql_Library->Execute("SET character_set_client=greek");
$MySql_Library->Execute("SET character_set_connection=greek");
$MySql_Library->Execute("SET character_set_results=greek");

The above example was run in some AdoDB Phakt scripts, but the gist of it is before any selects run the above sql commands.

Good luck…