zoukankan      html  css  js  c++  java
  • POSTGRESQL 9.1 FATAL: password authentication failed for user "postgres"

    1.配置postgreql 可以远程访问:

    sudo vim /etc/postgresql/9.1/main/postgresql.conf

    root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/postgresql.conf
    —>改变行:#listen_addresses = ‘localhost’
    —>修改为:listen_addresses = ‘*’
    —>改变行:#password_encryption = on
    —>修改为:password_encryption = on
    root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/pg_hba.conf
    —>文件末添加行:# to allow your client visiting postgresql server
    —>文件末添加行:host all all 0.0.0.0 0.0.0.0 md5
    root@ubuntuserver:~# sudo /etc/init.d/postgresql-9.1 restart

    2.修改默认的postgres 密码 

    sudo -u postgres psql template1


    ALTER USER postgres with encrypted password 'your_password'

    3.重启POSTGRESQL服务

    sudo /etc/init.d/postgresql-9.1 restart

  • 相关阅读:
    第三方应用调用应用市场和唤醒APP
    tp5 输入域名即访问指定页面
    反射概述(静态 VS 动态语言)
    自定义注解
    元注解
    内置注解
    什么是注解
    线程小结(代码)
    线程池
    信号灯法
  • 原文地址:https://www.cnblogs.com/kfx2007/p/3468772.html
Copyright © 2011-2022 走看看