# 切换到 gitlab-psql 用户登录
su - gitlab-psql
# 连接到 gitlabhq_production 库
psql -h /var/opt/gitlab/postgresql -d gitlabhq_production
进行 gitlab 数据库操作:
SELECT id,email,name,username,state FROM users WHERE username='root';
UPDATE users SET state = 'active' WHERE id = 1;