Converting mysql databases to UTF8

UTF8 is the way to go when you're creating a new database for an application, but how do you get your existing applications upgraded? We dump the database and then import it with the new character set so we can test things out:
# Export your latin1 encoded database

            --compatible=mysql40 dbname
            > dump.sql
        # Import database as utf8

            < dump.sql
Note: wrapped for your reading convenience; these should all be on one line if you're typing them at the command line.

Established 2005 · Databasically © 2016