Support for mysql 8.4.0?

Anyone know if mysql 8.4.0 is supported (or planned to be supported)

According to documentation, mysql 8.0.12+ is supported.

I have everything working great on mysql 8.3.0, but when I try to upgrade to 8.4.0 I get these errors:

{"timestamp":"2024-05-27 15:37:29.606 -07:00","level":"error","msg":"Error to reset the server status.","caller":"app/server.go:856","error":"failed to update Statuses: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Manual = false' at line 1"}

{"timestamp":"2024-05-27 15:40:00.014 -07:00","level":"warn","msg":"Failed to fetch dnd statues from store","caller":"app/status.go:66","err":"UpdateExpiredDNDStatuses: updateExpiredDNDStatusesT: updateExpiredStatusesT: failed to update statuses: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Manual = ? WHERE (Status = ? AND DNDEndTime > ? AND DNDEndTime <= ?)' at line 1"}

{"timestamp":"2024-05-27 15:45:00.004 -07:00","level":"warn","msg":"Failed to fetch dnd statues from store","caller":"app/status.go:66","err":"UpdateExpiredDNDStatuses: updateExpiredDNDStatusesT: updateExpiredStatusesT: failed to update statuses: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Manual = ? WHERE (Status = ? AND DNDEndTime > ? AND DNDEndTime <= ?)' at line 1"}

So it looks like there may have been a change in mysql 8.4.0 that is incompatible with mattermost? Any idea if/when that might be fixed?

MySQL support is being deprecated. I’d migrate to Postgres. Migration guidelines from MySQL to PostgreSQL - Mattermost documentation

Migration of an existing database from mysql to postgresql is non-trivial; the instructions on that page are non-trivial to understand and follow. The resources required to do it may be beyond what an existing server can handle (e.g. the linked article suggests minimum of 16 gigs or RAM).

I’m am getting the same issue as @bluecedar. I am wondering if he resolved it. The error reads like above, but also:

{"timestamp":"2024-07-02 02:55:14.741 Z","level":"error","msg":"Encountered an error retrieving the status.","caller":"web/context.go:115","path":"/api/v4/users/status/ids","request_id":"...","ip_addr":"...","user_id":"...","method":"POST","err_where":"GetUserStatusesByIds","http_code":500,"error":"GetUserStatusesByIds: Encountered an error retrieving the status., failed to find Statuses: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Manual, LastActivityAt FROM Status WHERE UserId IN (?,?,?,?,?)' at line 1"}

It is possible that there was a database migration that I skipped; my usual update routine was catastrophically broken this time around.

I opened a ticket with support when I first posted this question, and they told me there is a source code fix pending.

Hard agree with @jacob-lee – if it’s the position of mattermost that we need to migrate from mysql to postgres, you need to provide a much more straightforward (and safer) procedure.

1 Like

@bluecedar - We are working on a new tool that works at a higher level and does some of the automated tasks needed in the migration. There’s a PR out for it: [MM-59259] add migration-assist documentation by isacikgoz · Pull Request #7237 · mattermost/docs · GitHub. Should be merged soon.

Re: MySQL 8.4 support, we recently fixed it: [MM-58341] db/migrations: mysql-8.4 fix for 000027_create_status by isacikgoz · Pull Request #27080 · mattermost/mattermost · GitHub. It should be available in 9.10 onwards.

But note that, by Mattermost v11, you must migrate to Postgres.