hehe,let's see how to create a user in Postgresql. It's easy.
we login the psql,and use this command:
create user andrewleung with createdb password '123456';
Now,we have create a user which name 'andrewleung' with the password 123456 and the permission of create database. if we wanna cancel the permission of create database,we can use this command:
alter user andrewleung no createdb;
The complete Syntax for the CREATE USER command is
CREATE USER user-name
[[WITH] option ]...
option := SYSID user-id-number
| [NO]CREATEDB
| [NO]createuser
| IN GROUP groupname [,...]
| [[UN]ENCRYPTED ] PASSWORD 'password'
| VALID UNTIL 'expiration'
原文地址:https://www.jb51.cc/postgresql/197428.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。