index.md 751 Bytes
Newer Older
Shane A. Stillwell's avatar
Shane A. Stillwell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
---
title: "Weird characters after mysqldump export and import on new server"
id: 67
date: "2009-10-13T19:10:09-05:00"
tags: 
- MySQL
- Programming
---

The other day I had to migrate a Wordpress database from one server to the other.  I used `mysqldump` to export the SQL and data from the old server.

Then I used this to import
`
mysql -uusername -ppassword database < backup.sql
`

This went fine, but I found I was seeing weird characters in the front end and through phpmysqladmin.  The "Collation" on both tables seemed the same.

Then I stumbled on a website that offered this change when importing

`
mysql -uusername -ppassword --default-character-set=utf8 database < backup.sql
`

That fixed my troubles... now on to more important things.