Is this a safe way to convert MySQL tables from latin1 to utf-8?

前端 未结 3 1802
礼貌的吻别
礼貌的吻别 2020-12-19 01:37

I need to change all the tables in one of my databases from latin1 to utf-8 (with utf8_bin collation).

I have dumped the database, created a test database from it, a

3条回答
  •  一个人的身影
    2020-12-19 02:18

    I've done this a few times on production databases in the past (converting from the old standard encoding swedish to latin1), and when MySQL encounters a character that cannot be translated to the target encoding, it aborts the conversion and remains in the unchanged state. Therefor, I'd deem the ALTER TABLE statement working.

提交回复
热议问题