MySQL: Change collation for all tables

Posted on 2009-12-23
Last Modified: 2012-06-27
I moved my database from one server to another server.  However in the process, the collation for all tables was changed from utf8_unicode_ci to utf8_general_ci

How can I change the collation back to utf8_unicode_ci for all tables?
Question by:hankknight
    LVL 4

    Assisted Solution

    LVL 4

    Accepted Solution

    Have you attempted simply using a SQL statement to change the collation?
    LVL 14

    Assisted Solution

    If it is not a large database (too many records) then you can export it to a .sql file, replace the collation with any text editor and re-import it again.
    If the number of tables is small, you can change the collation manually using phpMyAdmin/operations

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi ( had suggested a “sed” way, I actually shell …
    More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now