Access your PostgreSQL v11+ database
sudo -u postgres psql
Create the Mattermost database
CREATE USER mmuser WITH PASSWORD 'mmuser-securepassword';
CREATE DATABASE mattermost;
Grant the user access to the Mattermost database
GRANT ALL PRIVILEGES ON DATABASE mattermost to mmuser;
ALTER DATABASE mattermost OWNER TO mmuser;
/q
PostgreSQL v15 only: Create schema permissions
GRANT USAGE, CREATE ON SCHEMA PUBLIC TO mmuser;
/q
High availability & multi-server deployments
/etc/postgresql/VERSION/main/postgresql.conf
Ensure only Mattermost Server can connect to the PostgreSQL port
Edit the postgresql.conf file and update the listen_addresses line to *: listen_addresses = '*'
sudo systemctl restart postgresql
Configure database connections
/etc/postgresql/VERSION/main/pg_hba.conf
Reload PostgreSQL
sudo systemctl reload postgresql
Verify you can connect with the user mmuser
Single server
psql -U mmuser mattermost
Multi-Server
psql --host={postgres-server-IP} --dbname=mattermost --username=mmuser --password
Exit the PostgreSQL terminal
\q
Visit the following Mattermost product documentation pages for details:
What Mattermost admin topics do you want to see covered in a training video? Share your feedback with us at training@mattermost.com.
0 comments