Mattermost, Inc.

(SOLVED) Installing local Server on Ubuntu Desktop 18.04 LTS PB

Hi There!

I’m following the doc https://docs.mattermost.com/install/install-ubuntu-1804.html
I’m using MySQL

at step 9.b when I Start the Mattermost server as the user mattermost, I have this answer:

/opt/mattermost$ sudo -u mattermost ./bin/mattermost
Error: failed to load configuration: failed to load: invalid config: Config.IsValid: model.config.is_valid.sql_driver.app_error:

THX 4 help

Hi @Ludo! Make sure your SqlSettings are correct and that your configuration file is valid, specifically the DriverName which should be set to mysql or postgres. To check your configuration file use this CLI command.

Hi Thx @paulrothrock for ur quick response. the config.json ( /opt/mattermost/config/config.json)
is already as follow
“SqlSettings”: {
“DriverName”: “mysql”,
“DataSource”: “mmuser:mmuser-password@tcp(localhost:3306)/mattermost?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s”,

Hi, @Ludo

For sanity check purposes, can you please run the following command on your Mattermost terminal and provide the full output with any sensitive information such as password redacted?

cat /opt/mattermost/config/config.json | grep -A11 "SqlSettings"

Just want to make sure that we don’t miss out on any details. For example, this is how it looks like on my end:

ahmaddanial@mattermost:~$ cat /opt/mattermost/config/config.json | grep -A11 "SqlSettings"
    "SqlSettings": {
        "DriverName": "mysql",
        "DataSource": "xxxxx:xxxxx@tcp(127.0.0.1:3306)/mattermost?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s",
        "DataSourceReplicas": [],
        "DataSourceSearchReplicas": [],
        "MaxIdleConns": 20,
        "ConnMaxLifetimeMilliseconds": 3600000,
        "MaxOpenConns": 300,
        "Trace": false,
        "AtRestEncryptKey": "xxxxx",
        "QueryTimeout": 30
    },

Also, may I know the behavior if you change localhost to the IP address 127.0.0.1 which is similar to mine? Are you still getting the same error too?

Hi @ahmaddanial, thx for ur help.
my config.json looked exactly the same than yours… but still some errors.
I’ve solved the issue by installing PostgreSQL, with the good settings, and it works now!

1 Like