PostgreSQL 安装,使用总结

前端之家收集整理的这篇文章主要介绍了PostgreSQL 安装,使用总结前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Postgresql 安装
#yum install postgresql93-server postgresql93-contrib
#service postgresql-9.3 initdb

// 设置postgresql 自动启动
#chkconfig postgresql-9.3 on

#vi /var/lib/pgsql/9.3/data/pg_hba.conf
(replace "ident" with "md5")
(new config line)host all all 192.168.1.1(localhost ip)/16 md5

#vi /var/lib/pgsql/9.3/data/postgresql.conf
listen_addresses = '*'
port = 5432

#su - conversant
$sudo service postgresql-9.3 start
$sudo su - postgres
$psql
postgres=# alter user postgres with password 'qa654321';
postgres=# create database testdb;


$sudo su - postgres
$psql -d testdb-U postgres
testdb=#\i /opt/app/xxxx-Postgresql.sql

$sudo /sbin/iptables -I INPUT -p tcp --dport 5432 -j ACCEPT
$sudo /etc/rc.d/init.d/iptables save
$sudo /etc/init.d/iptables status
@H_502_37@

退出数据库:\q@H_502_37@


@H_502_37@

修改Postgresql 密码:@H_502_37@

http://www.360doc.com/content/13/0822/10/10384031_309039914.shtml @H_502_37@ 原文链接:https://www.f2er.com/postgresql/194665.html

猜你在找的Postgre SQL相关文章