# \[Solved\] Can't migrate 10.0.0 from MySQL 8.4 to Postgres due to MySQL auth changes

**URL:** <https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694>\
**Category:** Troubleshooting\
**Created:** [September 23, 2024, 6:04pm UTC](https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694 "2024-09-23T18:04:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpdmoore](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@tpdmoore](https://forum.mattermost.com/u/tpdmoore)\
**Post date:** [September 23, 2024, 6:04pm UTC](https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694/1 "2024-09-23T18:04:53Z")

</div>

**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](https://docs.mattermost.com/deploy/postgres-migration-assist-tool.html)

**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](https://github.com/dimitri/pgloader/issues/782)

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.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [September 24, 2024, 6:10pm UTC](https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694/2 "2024-09-24T18:10:36Z")

</div>

Hi @tpdmoore, thanks for reaching out! It looks like the MySQL 8.4 authentication changes are causing issues with pgloader. You may want to check our [PostgreSQL Migration documentation](https://docs.mattermost.com/deploy/postgres-migration.html) for any updates, and consider trying a manual export/import process as a potential workaround. Let us know if you need further assistance!

---

<div class="post-metadata">

**Author:** ![tpdmoore](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@tpdmoore](https://forum.mattermost.com/u/tpdmoore)\
**Post date:** [September 25, 2024, 6:40pm UTC](https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694/3 "2024-09-25T18:40:18Z")

</div>

Manual process doesn’t fix the problem because it still uses pgloader

I managed to work around this problem by using [proxysql](https://github.com/sysown/proxysql) to proxy pgloader’s connection to the Mattermost MySQL database. The migration completed and I’m up and running on postgres

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [October 1, 2024, 5:31pm UTC](https://forum.mattermost.com/t/solved-cant-migrate-10-0-0-from-mysql-8-4-to-postgres-due-to-mysql-auth-changes/19694/4 "2024-10-01T17:31:00Z")

</div>

Yay! Thanks so much for following up to let us know, David!
