[thelist] mySQL - mass change of collation

Jeremy Weiss eccentric.one at gmail.com
Sun Apr 29 20:43:56 CDT 2007


Short version:
Is there way to construct a SQL statement that I can run that would change
the collation for all the tables and all the fields in those tables?

Extended version:
I recently switched hosting companies during which time I backed up my DBs
for multiple Drupal based sites and then reloaded the info on the new server
at the new host. However, it seems that the default collation on the new
host's db server is latin1_swedish_ci rather than utf8_general_ci. This is
causing several problems with the Drupal sites, the primary one being that
you can't log in. I've gone through (using phpMyAdmin) and manually switched
everything on one site, but it took me several hours. Is there way to
construct a SQL statement that I can run that would change the collation for
all the tables and all the fields in those tables?

TIA,
-jeremy




More information about the thelist mailing list