Docker安装gitlab后连接内置pgsql修改用户信息

Docker安装gitlab后连接内置pgsql修改用户信息

进入gitlab容器

docker exec -it gitlab /bin/bash

进入postgresql

su - gitlab-psql

连接pgsql

psql -h /var/opt/gitlab/postgresql -d gitlabhq_production

命令行直接执行SQL语句

psql -h /var/opt/gitlab/postgresql -d gitlabhq_production -c "select * from xxx;"

查询用户信息

select * from users;
select email, notification_email, commit_email from users where id = 1;

修改用户信息

update users set email='test@foxmail.com',notification_email='test@foxmail.com',commit_email='test@foxmail.com' where id = 1;

相关推荐
lonelyhiker4 分钟前
Docker 客户端 IDEA
docker·eureka·intellij-idea
console.log('npc')3 小时前
Windows 11 安装 WSL2 + Ubuntu + Docker + Codex + Sub2API 教学
windows·docker·powershell·ubantu·codex
仙柒4155 小时前
Docker原理
运维·docker·容器
Cat_Rocky10 小时前
Kubernetes集群升级指南以及自动更新证书
云原生·容器·kubernetes
米高梅狮子10 小时前
第2章 docker容器
运维·docker·云原生·容器·架构·kubernetes·自动化
万里侯10 小时前
分布式系统设计原则:构建高可用的系统架构
微服务·容器·k8s
卧室小白13 小时前
docker网络与服务编排与集群
运维·docker·容器
古城小栈14 小时前
K8s 之 ingress
云原生·容器·kubernetes
借你耳朵说爱你15 小时前
docker容器启动报错:library initialization failed - unable to allocate file descriptor table - out of memory
docker
万里侯15 小时前
微服务与人生:从服务网格看人际关系
微服务·容器·k8s