postgresql学习-Part 1
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,1. 错误, 允许本地连接:-bash-4.1$ psql mydbpsql: FATAL: no pg_hba.conf entry for host "[local]", user "postgr
千家信息网最后更新 2026年11月02日postgresql学习-Part 11. 错误, 允许本地连接:
-bash-4.1$ psql mydb
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "mydb", SSL off
在配置文件:pg_hba.conf增加如下内容
# IPv4 local connections:
#允许本地连接
local all all trust
#允许远程连接
host all all 0.0.0.0/0 md5
2. 推出psql命令行
\q
mydb-# \q
-bash-4.1$
3. 类似于oracle sqlplus
mydb=# select version();
version
-------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.4.20 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
(1 row)
mydb=# select current_date;
date
------------
2017-05-18
(1 row)
-bash-4.1$ psql mydb
psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "mydb", SSL off
在配置文件:pg_hba.conf增加如下内容
# IPv4 local connections:
#允许本地连接
local all all trust
#允许远程连接
host all all 0.0.0.0/0 md5
2. 推出psql命令行
\q
mydb-# \q
-bash-4.1$
3. 类似于oracle sqlplus
mydb=# select version();
version
-------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.4.20 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
(1 row)
mydb=# select current_date;
date
------------
2017-05-18
(1 row)
内容
命令
文件
错误
配置
学习
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
咖啡
互联网科技公司
中关村互联网科技集团
互联网和科技技术
新华互联网科技学院
智能科技公司是互联网公司吗
互联网巨头反垄断金融科技
科技类互联网
喔噻互联网科技
互联网与新科技
唐信互联网科技 大连
中正互联网科技招聘
成都互联网科技公司100强
燊美集互联网科技有限公司
华夏恒生互联网科技013171
烟台灵鸽互联网科技有限公司
沐思想互联网科技有限公司
广州千川互联网科技有限公司
福建互联网展示科技馆设计
互联网科技手机排行榜
耶加雪菲
互联网科技
今日互联网科技
重庆互联网络科技
佩信高科技互联网
汽车互联网创新科技园
本届互联网博览会上的黑科技
西安有哪些互联网高科技企业
数字互联网科技有限公司
杭州科技互联网公司有哪些