Summary
Mattermost PostgreSQL migration doesn’t work when migrating from MySQL 8.4 due to authentication changes in that version
Steps to reproduce
Attempt to migrate Mattermost 10.0.0 from MySQL 8.4 to Postgresql using pgloader
Expected behavior
Migration proceeds as described in the documentation here: Automated PostgreSQL migration - Mattermost documentation
Observed behavior
I am able to complete steps 1-3, I have created a pgloader configuration. When I try to complete step 4 ‘run pgloader’, it fails with the following error:
ERROR mysql: Failed to connect to mysql at "1.2.3.4" (port 3306) as user "mmmigration": Condition QMYND:MYSQL-UNSUPPORTED-AUTHENTICATION was signalled.
The workaround listed in the pgloader issue here is no longer applicable due to changes in MySQL 8.4: QMYND:MYSQL-UNSUPPORTED-AUTHENTICATION attempting to load data from mysql 8.0.4-rc. · Issue #782 · dimitri/pgloader · GitHub
Based on my research, pgloader cannot connect to MySQL 8.4 at all, due to authentication changes introduced in MySQL 8.4. I am looking for a fix or workaround for this problem
I created my MySQL user like so:
CREATE USER 'mmmigration'@'%' IDENTIFIED WITH mysql_native_password BY 'foo';
in mysql.conf I have this:
mysql-native-password=ON
MySQL 8.4 removes the configuration option default_authentication_plugin
so this is as much as I can do to get MySQL to authenticate with native password.