Setting connection collation in master for slave replication I am trying to replicate a MySQL 8 server (master) to MySQL 5.7 (slave) instance. I know it is not officially supported, but the thing is we need to use a service that has only supports MySQL 5.7.

I know there are a few collations that are not available in MySQL5.7 which are present in MySQL8. For that, i converted all tables from utf8mb4_0900_ai_ci to utf8mb4_general_ci as our data values are supported by both, so I was able to do this without any consequences.  

I have also set the following settings in my master's configuration:  

character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
init_connect='SET collation_connection = utf8mb4_general_ci; SET NAMES utf8mb4;'


which yields me the following: (I am not connected as superuser)

mysql80&gt; SHOW VARIABLES LIKE 'collation%';
+----------------------+--------------------+
| Variable_name        | Value              |
+----------------------+--------------------+
| collation_connection | utf8mb4_0900_ai_ci |
| collation_database   | utf8mb4_general_ci |
| collation_server     | utf8mb4_general_ci |
+----------------------+--------------------+


Now I have narrowed it down to this that my collation_connection is the culprit because utf8mb4_0900_ai_ci is not part of MySQL57. Due to which I get the following error on slave:  

Error 'Character set '#255' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file' on query. Default database: 'database'. Query: 'BEGIN'


Is there any way to force my master instance to use utf8mb4_general_ci instead of utf8mb4_0900_ai_ci?

Regards
Find all the Stored Routines; capture the ability to re-CREATE them.
Change the DEFAULT COLLATION for each DATABASE that had such routines.
DROP those routines.
Re-CREATE them.
SHOW CREATE PROCEDURE (etc) to verify that the collation is compatible with 5.7.