Database migration


we are running Mattermost Enterprise version 4.3.2 on CentOS 7.7 and using mysql database, which is stored on remote server.

Due to heavy usage of remote server we want to move database to local server (same one running mattermost instance).

We performed following steps (no errors encountered):

  • stopped mattermost service

  • installed mysql on local server, created mattermost database, mmuser and granted it all privileges.

  • exported mattermost database on remote server with mysqldump -u root -p --opt mattermost > /tmp/mattermost.sql

  • Copied database to local server

  • Imported database on local server mysql -u root -p mattermost < /var/lib/mysql/mattermost/mattermost.sql

  • Edited json config file on mattermost so it points to local server


Service started successfully and connected to local db but i was enable to login - in service log found only this error:

unable to validate username/password.

When I stop mysqdl on local server, then mattermost reports that database is unreachable.

My question is did we miss something during database migration or in json config file?

Since migration was not successfully, virtual machine was reverted to snaphot taken before.

Thank you in advance.

Best regards,


Would you be open to upgrading to a more recent server version? We support versions v5.19 and later.

1 Like

Yes, we will upgrade mattermost to the latest version (correction regarding existing version, it is 5.17.0).