MySQL & Invalid session error on Mattermost

@Babbles, what @jchungvz meant by “Are your mattermost server and mariadb on separate systems ?” is whether your Mattermost instance and database instance are installed in a separate servers. Can you please confirm on that?

The invalid session error you shared looks similar to User gets logged out on page refresh. So, can you share the session related settings here so we can perhaps shed more light here?