Jan 11, 2022 · 1 min · PostgresSQL
# docker 容器化安装PostgresSQL docker run --name pgsql --restart always -e POSTGRES_PASSWORD=your_password -p 15432:5432 -v /data/middleware/postgresql/:/var/lib/postgresql -d postgres
docker pull image镜像报错:
error pulling image configuration: download failed after attempts=6: dial tcp [2a03:2880:f111:83:face:b00c:0:25de]:443: i/o timeout
解决:
vim /etc/docker/daemon.json { "registry-mirrors": ["https://registry.docker-cn.com","https://nrbewqda.mirror.aliyuncs.com","https://dmmxhzvq.mirror.aliyuncs.com"] }
重启dockersystemctl restart docker
systemctl restart docker
-- 查询pg版本 SELECT * FROM version(); -- 查询pg是否安装aes加解密模块 SELECT * FROM pg_available_extensions; -- 找到:pgcrypto | 1.3 | cryptographic functions -- 启动pgcrypto的支持 -- CREATE EXTENSION pgcrypto; -- 刷新权限 grant select on all tables in schema public to your_user #