Limiting database access

Mattermost is intended to be managed by a System Administrator, who effectively has the power to do anything with the system. We don’t really support connecting directly to the database, as it is intended to only be accessed via Mattermost and related tools. That said, the DataSource config element is just a MySql connection string, so you may be able to accomplish your goal after a close read of the MySql documentation.