# Self-hosted MySQL to PostgreSQL migration

**URL:** <https://forum.mattermost.com/t/self-hosted-mysql-to-postgresql-migration/16599>\
**Category:** Uncategorized\
**Created:** [August 3, 2023, 5:49pm UTC](https://forum.mattermost.com/t/self-hosted-mysql-to-postgresql-migration/16599 "2023-08-03T17:49:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![it33\_mattermost](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33_mattermost/32/6971_2.png) [@it33\_mattermost](https://forum.mattermost.com/u/it33_mattermost)\
**Post date:** [August 3, 2023, 5:49pm UTC](https://forum.mattermost.com/t/self-hosted-mysql-to-postgresql-migration/16599/1 "2023-08-03T17:49:29Z")

</div>

One program underway at Mattermost is dialing our guidance on migrating from MySQL to PostgreSQL as the primary self-hosted database we support long term, and helping guide and service customers and community on the journey towards what we believe will be a more scalable, resilient and innovative future.

It’s a priority at Mattermost to drive value for our community and customers. Trying to support and scale two different databases, and hitting significant and esoteric issues with MySQL at scale, is slowing and confounding our ability to deliver new value.

As one example, the work we are doing on our new AI integration platform, OpenOps ([GitHub - mattermost/openops: Open source stack for applying AI to workflows in secure environments](https://github.com/mattermost/openops)) is PostgreSQL only and we’re able to move at a faster and more streamlined pace with a simpler set of defaults.

There’s more work to be done, and we’ll continue to communicate as we bring together examples, tools and service partners to support our customers and community to an ever more exciting and productive platform.

Selected related links:

> <https://github.com/mattermost/mattermost-plugin-ai/issues/19#issuecomment-1640730247>
>
> RIght now, I get:
> 
> error \[2023-06-23 08:25:18.948 +02:00\] Unable to activate p…lugin caller="app/plugin.go:171" plugin\_id=mattermost-ai error="this plugin is only supported on postgres"

> [@Migrating from MariaDB to PostgreSQL DB](https://forum.mattermost.com/t/migrating-from-mariadb-to-postgresql-db/14194/10):
>
> Just to add info about the first trouble (challenges?) I faced with my migrated DB: When trying to upgrade my Mattermost 7.3.0 to 7.4.0 today Mattermost Boards refused to start, its DB migration failed. The reason was the props attribute (normally JSON content) in the Users table, where (probably during the migration) some “null” Strings crept in (so no NULL SQL values, a literal String saying “null”). This was easy to fix though: UPDATE Users SET props = '{}' WHERE props = 'null'; Mattermo…
