latin1 to utf8

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am using mysql and have some data in my application in the latin1
charset. I have a necessity to support the utf 8 charset. Now I want to
migrate the data between these two charset.

The normal way I do migration is as follows:

Taking a dump of the data with the currently running mysql
converting the  necessary parameters in the mysql settings and starting
the mysql with utf8 support
droping the database.
replacing latin1 to utf 8 in the dump.sql file
loading the data back on to the mysql db.

I am fearing of a data inconsistency in the way I do....

Is the above way fool proof and will not cause any data loss or there
is a easy way to convert things to utf8 support using mysql commands
without using a dump.

Appreciate a quick response.

Thanks ,

Re: latin1 to utf8 wrote:
Quoted text here. Click to load it

I don't know any answers to your questions, but here is something to
read about:

Re: latin1 to utf8

ALTER TABLE tablename charset='utf8';

Doesn't that work?  Keep in mind that it's basically going to do what
you are doing - create a new table (with utf8 charset), copy the data
over, and rename the table.

If you need MySQL (or PostgreSQL) training, we offer a wide range of
both. ( )

Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
Phone: 877-258-8987/919-463-0999 wrote:
Quoted text here. Click to load it

Site Timeline