postgresql安装

Posted 76 months ago linux postgresql pg mysql 数据库

pgsql/bin/initdb -D /usr/local/pgsql/data
local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
local/pgsql/bin/createdb test
local/pgsql/bin/psql test

账户设置

创建用户
CREATE USER davide WITH PASSWORD 'jw8s0F4';
改密码
ALTER ROLE davide WITH PASSWORD 'hu8jmn3';
让一个角色能够创建其他角色和新的数据库:
ALTER ROLE miriam CREATEROLE CREATEDB;

点击评论