You need to execute the alter table statement for each table. The application will follow this form:
ALTER TABLE tbl_name [[DEFAULT] CHARACTER SET charset_name] [COLLATE collation_name]
Now, to get all the tables in the database, you need to execute the following query:
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA="YourDataBaseName" AND TABLE_TYPE="BASE TABLE";
So now MySQL will write you the code:
SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA, '.', TABLE_NAME," COLLATE your_collation_name_here;") AS ExecuteTheString FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA="YourDatabaseName" AND TABLE_TYPE="BASE TABLE";
You can copy the results and execute them. I have not tested the syntax, but you should be able to figure out the rest. Think of it as a little exercise.
Hope this helps!
Namphibian Jun 02 2018-12-12T00: 00Z
source share