mysqlcollation

How to change collation of database, table, column?


The database is latin1_general_ci now and I want to change collation to utf8mb4_general_ci.

Is there any setting in PhpMyAdmin to change collation of database, table, column? Rather than changing one by one?


Solution

  • You need to either convert each table individually:

    ALTER TABLE mytable CONVERT TO CHARACTER SET utf8mb4 
    

    (this will convert the columns just as well), or export the database with latin1 and import it back with utf8mb4.