Problem
When using Mattermost version 10.5 or higher with the unsupported MariaDB database backend, mobile push notifications fail to deliver. This issue occurs because MariaDB is no longer fully compatible with MySQL, resulting in SQL syntax errors during notification processing.
Symptoms
Instances experiencing this issue will see in the notifications log:
{"timestamp":"2025-07-23 11:27:10.967 +02:00","level":"error","msg":"Failed to send mobile app sessions","caller":"app/notification_push.go:124","logSource":"notifications","type":"push","status":"error","reason":"fetch_error","user_id":"y9t1yu6ptbdtmxnetfwqk37zwe","error":"getMobileAppSessions: We encountered an error while finding user sessions., failed to find Sessions with userId=y9t1yu6ptbdtmxnetfwqk37zwe: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''$.last_removed_device_id', '')' at line 1"}Additional symptoms:
- Mobile push notifications do not reach end users
- SQL syntax errors appear in the notifications log
Solution
To resolve this issue, Mattermost administrators must migrate their database from MariaDB to MySQL. MariaDB is not a supported database backend for Mattermost v10.5 and later versions.
Migration Steps
Follow the comprehensive migration guide provided by Oracle MySQL to migrate from MariaDB to MySQL 8.0. The migration process involves exporting your MariaDB data and importing it into a MySQL database instance.
How to Migrate from MariaDB to MySQL 8.0 - Oracle MySQL Blog
Comments
Article is closed for comments.