Postgresql 密码设置
今天下午 陷进去了 其实很简单的一个事情结果浪费了 接近一个小时. 做事情必须要细致一些. 自己的确做的不好.
这里面简单说一下pg_hba.conf 和 postgresql 密码的一些设置问题.
1. windows 机器
安装pg 时 有一个 让输入密码的地址 这个 直接输入密码就可以了.
然后如果想修改密码的话 可以在命令行里面处理.:

然后修改 data 目录下面的 : pg_hba.conf

注意里面的配置文件内容:
The first field is the connection type: "local" is a Unix-domain
socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
"hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
plain TCP/IP socket. DATABASE can be "all", "sameuser", "samerole", "replication", a
database name, or a comma-separated list thereof. The "all"
keyword does not match "replication". Access to replication
must be enabled in a separate record (see example below). USER can be "all", a user name, a group name prefixed with "+", or a
comma-separated list thereof. In both the DATABASE and USER fields
you can also write a file name prefixed with "@" to include names
from a separate file. ADDRESS specifies the set of hosts the record matches. It can be a
host name, or it is made up of an IP address and a CIDR mask that is
an integer (between and (IPv4) or (IPv6) inclusive) that
specifies the number of significant bits in the mask. A host name
that starts with a dot (.) matches a suffix of the actual host name.
Alternatively, you can write an IP address and netmask in separate
columns to specify the set of hosts. Instead of a CIDR-address, you
can write "samehost" to match any of the server's own IP addresses,
or "samenet" to match any address in any subnet that the server is
directly connected to. METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
"gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
Note that "password" sends passwords in clear text; "md5" or
"scram-sha-256" are preferred since they send encrypted passwords. OPTIONS are a set of options for the authentication in the format
NAME=VALUE. The available options depend on the different
authentication methods -- refer to the "Client Authentication"
section in the documentation for a list of which options are
available for which authentication methods. Database and user names containing spaces, commas, quotes and other
special characters must be quoted. Quoting one of the keywords
"all", "sameuser", "samerole" or "replication" makes the name lose
its special character, and just match a database or username with
that name. This file is read on server startup and when the server receives a
SIGHUP signal. If you edit the file on a running system, you have to
SIGHUP the server for the changes to take effect, run "pg_ctl reload",
or execute "SELECT pg_reload_conf()". Put your actual configuration here
2. linux机器的话 也不复杂
而且 postgres 用户的话 不需要输入密码就可以登录了 能够直接修改密码...

其他配置文件都是一样的.
Postgresql 密码设置的更多相关文章
- 更改MySQL/Postgresql密码
Parrot包括几个SQL引擎,但是当它们被预先安装时,默认密码未被配置,并且拒绝访问其root用户. 重新配置Mysql / Mariadb密码 停止MySQL服务. sudo service my ...
- redis密码设置、访问权限控制等安全设置
redis作为一个高速数据库,在互联网上,必须有对应的安全机制来进行保护,方法有2,如下. 1.比较安全的办法是采用绑定IP的方式来进行控制. 请在redis.conf文件找到如下配置 # If y ...
- GRUB密码设置
通过编辑GRUB启动参数可以轻松的进入单用户模式从而修改root密码,GRUB的密码设置可分为全局密码和菜单密码. 一,全局密码设置 在splashimage这个参数的下一行可以加上passw ...
- Linux - root初始密码设置
Ubuntu刚安装后,不能在terminal中运行su命令,因为root没有默认密码,需要手动设定. 以安装ubuntu时输入的用户名登陆,该用户在admin组中,有权限给root设定密码. 给roo ...
- xampp默认mysql密码设置,修改mysql的默认空密码
xampp默认mysql密码设置,修改mysql的默认空密码 分类: xampp2012-09-12 11:24 30264人阅读 评论(5) 收藏 举报 mysqlphpmyadminauthent ...
- (转)mysql账号权限密码设置方法
原文:http://www.greensoftcode.net/techntxt/2013410134247568042483 mysql账号权限密码设置方法 我的mysql安装在c:\mysql 一 ...
- ubuntu 第一次安装时 默认root 密码设置
Ubuntu刚安装后,不能在terminal中运行su命令,因为root没有默认密码,需要手动设定. 以安装ubuntu时输入的用户名登陆,该用户在admin组中,有权限给root设定密码. 给roo ...
- Spring+SpringMVC+MyBatis+easyUI整合进阶篇(十一)redis密码设置、安全设置
警惕 前一篇文章<Spring+SpringMVC+MyBatis+easyUI整合进阶篇(九)Linux下安装redis及redis的常用命令和操作>主要是一个简单的介绍,针对redis ...
- redis的密码设置(windows与linux相同)
接着我们昨天的说,昨天redis的启动已经了解,今天来说说redis的密码设置.(不管怎么说redis也是数据库,也需要密码) 修改密码可以2种行径.第一种,直接修改配置文件,打开redis.conf ...
随机推荐
- HTML5 canvas getImageData() 方法
下面的代码通过 getImageData() 复制画布上指定矩形的像素数据,然后通过 putImageData() 将图像数据放回画布: var c=document.getElementById(& ...
- 远程桌面访问linux
hostname -I 10.13.34.185 4900 light-wings http://blog.csdn.net/qq754438390/article/details/50042511
- Qt+QGis二次开发:矢量图层的显示样式
原文链接:QGis二次开发基础 -- 矢量图层的显示样式
- 基于Matlab的多自由度系统固有频率及振型计算
可参考文涛,基于Matlab语言的多自由度振动系统的固有频率及主振型计算分析,2007 对于无阻尼系统 [VEC,VAL]=eig(inv(A)*K) 对于有阻尼系统,参考振动论坛计算程序 输入M,D ...
- 在NodeJS中操作文件常见的API
阅读目录 一:如何读整个文件内容? 二:如何写入整个文件内容? 三:如何在文件中的指定位置处读入内容? 四:如何在文件中的指定位置处写入内容? 五:如何创建与读取目录? 六:如何查看与修改文件或目录的 ...
- java 数据类型和运算符
1.注释 单行注释: //哈哈哈 多行注释: /* 啦啦啦 */ 文档注释: /** */注释中包含一些说明性的文字及一些JavaDoc标签(后期写项目时,可以生成项目的API) ...
- Kafka笔记--常用指令(新建、删除topic)
新建topic ./kafka-topics.sh --zookeeper 192.168.1.160:2181 --create --topic kafkatestsmall2 --partitio ...
- 串口通信-MSComm控件使用详解
串口通信-MSComm控件使用详解 2012年11月13日 09:35:45 他山之石可以攻玉 阅读数:37952更多 个人分类: 控件编程Delphi编程 MSComm 控件通过串行端口传输和接 ...
- Hive 实现 wordcount
创建表: create table hive_wordcount(context string); load data local inpath '/home/hadoop/files/hellowo ...
- [JSOI2016]无界单词[动态规划、kmp]
题意 题目链接 分析 对于第一问,枚举最终串最小的相同前后缀来统计答案. 由于最小的相同前后缀也是无界单词,所以可以考虑先求解子问题. 定义状态 \(f(i)\) 表示长度为 \(i\) 的串中有多少 ...