1. # 切换到 gitlab-psql 用户登录
    2. su - gitlab-psql
    3. # 连接到 gitlabhq_production 库
    4. psql -h /var/opt/gitlab/postgresql -d gitlabhq_production

    进行 gitlab 数据库操作:

    1. SELECT id,email,name,username,state FROM users WHERE username='root';
    2. UPDATE users SET state = 'active' WHERE id = 1;