postgresql创建用户

(1)内部命令create user 用户名 with superuser password '密码';   

          先进入数据库后用命令\h create user 查看帮助
 
 
with后面是一些参数。superuser 是指定创建超级用户。createdb 指新用户有创建数据库的权限 password 是指定密码。
 
 (2)外部shell命令: createuser 用户名  -s  -P '密码'
在linux命令行使用命令创建。在shell中用命令createuser --help查看帮助 
 
-s 是指成为超级用户,-P(大定)是指定密码
 
posted @ 2015-08-23 21:14  金明爱python  阅读(1982)  评论(0编辑  收藏  举报