Cheyne
Cheyne

Reputation: 2137

Heroku Postgress TAPS To Amazon RDS MySQL Migration Encoding

Im in the middle of trying to migrate fro Heroku shared Postgres to Amazon RDS MySQL instance, and iv followed all the steps listed here: https://devcenter.heroku.com/articles/heroku-postgresql

The migration went through fine, all the data was transferred except iv now noticed that any characters that arent the usual english charset are now question marks, like "?????"

I have a lot of users of my app from China, Thailand etc and all of their entered data is just questions marks, as though it has no idea how to encode it.

I know Heroku replaces the database.yml, so theres no use me showing you that, and I cant see any options to configure encoding on RDS.

All I did was the usual heroku db:pull mysql2://user:pass@isntance/db

Does anyone know how im able to migrate this data without screwing up the characters for these other languages?

Cheers

Upvotes: 2

Views: 426

Answers (1)

Cheyne
Cheyne

Reputation: 2137

Figured it out for anyone else who reads this.

You need to follow the instructions about setting your character set here: http://matthew.mceachen.us/blog/howto-configure-an-amazon-rds-instance-to-use-utf-8-925.html

But what I was missing is that I needed to drop the database completely and recreate it. The new charset applied to all new tables then.

Upvotes: 2

Related Questions