# HG changeset patch # User Ben Bodenmiller <bbodenmiller@gmail.com> # Date 1718247544 0 # Thu Jun 13 02:59:04 2024 +0000 # Node ID 25e3ad93cc5bc0ca0a0590898eb29399b6d1d012 # Parent 34e42e93f1f0629e2576ceab6519580bede4dbb9 Improve external database setup directions diff --git a/doc/settings/database.md b/doc/settings/database.md --- a/doc/settings/database.md +++ b/doc/settings/database.md @@ -306,8 +306,7 @@ - `sql_user`: Controls the expected username for MD5 authentication. This defaults to `gitlab`, and isn't a required setting. - `sql_user_password`: Sets the password that PostgreSQL will accept for MD5 - authentication. Replace `securesqlpassword` in the following example with an - acceptable password. + authentication. 1. Edit `/etc/gitlab/gitlab.rb`: @@ -320,6 +319,7 @@ ##! SQL_USER_PASSWORD_HASH can be generated using the command `gitlab-ctl pg-password-md5 'gitlab'`, ##! where 'gitlab' (single-quoted to avoid shell interpolation) is the name of the SQL user that connects to GitLab. + ##! You will be prompted for a password which other clients will use to authenticate with database, such as `securesqlpassword` in the below section. postgresql['sql_user_password'] = "SQL_USER_PASSWORD_HASH" # force ssl on all connections defined in trust_auth_cidr_addresses and md5_auth_cidr_addresses @@ -381,6 +381,12 @@ connections to PostgreSQL to be handled over the UNIX socket, and may not function properly. You can enable TCP/IP without disabling UNIX sockets. +To test access from other clients, you can run: + +```shell +sudo gitlab-rails dbconsole --database main +``` + ### Enabling PostgreSQL WAL (Write Ahead Log) Archiving By default, WAL archiving of the packaged PostgreSQL isn't enabled. Consider the