By ant71 on
My webhost has recently upgraded the MySQL database server from 4.0.x to 4.1.x. I am currently running Drupal 4.7.2 with the old MySQL 4.0 database schema (i.e. charsets are latin). I would like to upgrade the database to the 4.1 schema (i.e. utf-8 charsets) but am not sure what the smoothest way to do it would be.
I am guessing I would;
1. back up all files and the database.
2. drop the old database then run the 4.1 script
3. replace all the druapl files.
4. reinstall all modules
5. import content back into the database
Alternatively, could I just run alter table queries to change the character set of all tables?
Any suggestions greatfully received.
thanks
Comments
I think that both ways
I think that both ways should work.
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
How do I do an ALTER TABLE?
How do I do an ALTER TABLE? ALTER TABLE * CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; doesn't work :(
From http://dev.mysql.com/doc/refman/4.1/en/alter-table.html
I'm trying to solve the same problem
Is there a mysql guru in the house?
--
Get better help from Drupal's forums and read this.
use the metadata
This isn't so hard...
create a file that contains two lines:
show tables
quit
mysql --database=dbname --user=username --password=passwordforit < that_file > alter.sql
Now, edit alter.sql. Put 'alter table ' on the front of every line, and 'character set utf8;' on the back of every line.
Now feed to mysql.
Text still garbled
I tried the manual alter table method mentioned above. However, site text still comes out garbled.
I'm wondering if this because the DB itself still is latin1.