PostgreSQL

Men&Mice Central running on Linux

Edit the configuration file for Men&Mice Central:

nano /var/mmsuite/mmcentral/preferences.cfg

Find (or create) and set the following values:

1<database value="postgresql"/>
2<databaseserver value="[email protected]"/>
3<databaseusername value="USERNAME" />
4<databasepassword value="plaintext:PASSWORD" />

Where

  • HOSTNAME and DATABASE: the server’s hostname running the PostgreSQL service, and the system user on the server

  • USERNAME: the user with permissions to read and write the PostgreSQL database

  • PASSWORD: the database user’s password

Note

Once Central starts and reads the configuration file, it’ll automatically change the plaintext password to hashed, to increase security.

Restart Central and verify it’s running:

systemctl restart mmcentral
systemctl status mmcentral

If the database connection fails, the service will fail to start with the appropriate error message.

Men&Mice Central running on Windows

The preferences.cfg file in the data directory contains (beside the fingerprint of Central, i.e. the “password” XML-tag) four additional XML tags: database, databaseserver, databaseusername and databasepassword

The preferences.cfg file for normal user/password authentication should look like:

1<password value="the fingerprint hash"/>
2<database value="postgresql"/>
3<databaseserver value="<name or ip of the PostgreSQL server>\<name of instance, e.g. PSQLDB>@,<name of database, e.g. mmsuite"/>
4<databaseusername value="mmSuiteDBUser"/>
5<databasepassword value="password hash"/>

An example preferences.cfg file for the Windows Authentication method should look like (databaseusername tag must be present and the value attribute must be set to empty string):

1<password value="the fingerprint hash"/>
2<database value="postgresql"/>
3<databaseserver value="<name or ip of the PostgreSQL server>\<name of instance, e.g. PSQLDB>@,<name of database, e.g. mmsuite"/>
4<databaseusername value=""/>