当前位置:网站首页>PostgreSQL 修改数据库用户的密码
PostgreSQL 修改数据库用户的密码
2022-07-06 13:27:00 【ac.char】
pg_hba.conf,认证设置成md5认证连接出现:
postgresql FATAL: password authentication failed for user "postgres"

编辑pg_hba.conf,将md5认证修改成trust认证,编辑后退出保存
执行pg_ctl reload加载生效
psql连接,用alter role修改密码
执行以下命令
alter role postgres with password '新密码';
查看当前postgresql 有多少用户,及对应的密码
select rolname,rolpassword from pg_authid;
退出psql
编辑pg_hba.conf,将turst认证修改成md5认证,编辑后退出保存
执行pg_ctl reload加载生效
边栏推荐
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- 字符串的使用方法之startwith()-以XX开头、endsWith()-以XX结尾、trim()-删除两端空格
- Summary of cross partition scheme
- C # use Oracle stored procedure to obtain result set instance
- string的底层实现
- 启动嵌入式间:资源有限的系统启动
- Vim 基本配置和经常使用的命令
- document.write()的用法-写入文本——修改样式、位置控制
- Reflection operation exercise
- c语言char, wchar_t, char16_t, char32_t和字符集的关系
猜你喜欢

It's not my boast. You haven't used this fairy idea plug-in!

Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)

Seven original sins of embedded development

【Redis设计与实现】第一部分 :Redis数据结构和对象 总结

Dialogue with Jia Yangqing, vice president of Alibaba: pursuing a big model is not a bad thing

愛可可AI前沿推介(7.6)

【力扣刷题】一维动态规划记录(53零钱兑换、300最长递增子序列、53最大子数组和)

中国白酒的5场大战

Z function (extended KMP)

Aike AI frontier promotion (7.6)
随机推荐
SQL:存储过程和触发器~笔记
[sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
首批入选!腾讯安全天御风控获信通院业务安全能力认证
el-table表格——sortable排序 & 出现小数、%时排序错乱
uni-app App端半屏连续扫码
Description of web function test
麦趣尔砸了小众奶招牌
Numpy download and installation
guava:Collections.unmodifiableXXX创建的collection并不immutable
愛可可AI前沿推介(7.6)
ACdreamoj1110(多重背包)
Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?
Fastjson parses JSON strings (deserialized to list, map)
038. (2.7) less anxiety
分糖果
Forward maximum matching method
Redistemplate common collection instructions opsforhash (IV)
Redistemplate common collection instructions opsforlist (III)
Nodejs教程之Expressjs一篇文章快速入门