zoukankan      html  css  js  c++  java
  • Ubuntu 安装postgres后,解决可接受任何密码或无密码的问题

    1确保您已将postgres密码设置为您知道的密码:

    [###@EMOO ~]$ sudo -u postgres ./psql
    psql (9.6.3)
    Type "help" for help.
    
    postgres=# ALTER ROLE postgres WITH PASSWORD 'postgres password';
    

    2找到你的pg_hba.conf

    sudo updatedb
    sudo locate pg_hba.conf
    

    3在pg_hba.conf中将“trust”替换为“md5”

    4重新启动postgresql:

    sudo systemctl restart postgresql
    

    5登录为postgres并更改您需要的任何用户密码,如果用户没有提供正确的密码,

    sudo -u postgres ./psql
    
  • 相关阅读:
    ES6 解构
    一些vue的知识点
    CSS选择器
    Django学习--介绍Django
    正则表达式
    ftp命令
    Vim学习指南
    关于ACM与OJ
    brctl命令
    LXC
  • 原文地址:https://www.cnblogs.com/hhwww/p/12704380.html
Copyright © 2011-2022 走看看