Menu

Database configuration

Sebastian Reitenbach

OGo Database configuration

The database connection is configured using the LSConnectionDictionary default. Since this configuration is used by all daemons, it has to be configured in the NSGlobalDomain configuration domain.

defaults write NSGlobalDomain LSConnectionDictionary '{ \
    databaseName = OGo; \
    hostName = "127.0.0.1"; \
    password = ""; \
    port = 5432; \
    userName = OGo; \
}'

The values above show the default. When your database is called OGo, with username OGo and runs on the localhost, then the LSConnectionDictionary default doesn't need to be used. If you need to change any of the parameters to configure the database connection, then the whole LSConnectionDictionary needs to be configured.

  • databaseName: the actual name of the database
  • hostName: the IP address or FQDN of the database server
  • password: the password used for the user connecting to the database
  • port: the port where the database listens on the database server
  • userName: the username used to connect to the database