David542
David542

Reputation: 110093

Converting latin1 database to utf-8

I have a mysql database that has latin1 tables. I need to convert every column, table, etc. to utf-8. Specifically:

Encoding: UTF-8
Collation: utf8_general_ci (or utf-8's default)

What would be the quickest way to make these sweeping changes to my database?

Upvotes: 0

Views: 169

Answers (1)

spacediver
spacediver

Reputation: 1493

mysqldump, then edit your dump, replacing encoding specifiers for your tables and columns (and preserving your dump encoding in header SET NAMES command), then mysql back.

Upvotes: 1

Related Questions