# 创建数据库 create database xxx; # 查看数据库 \l # 查看表 \d # 查看表结构 \d table; # 切换数据库 \c db # 修改所有者 alter database xxx owner to xxx;
5、用户操作
1 2 3 4 5 6 7 8 9 10
# 创建用户 create user xxx; # 赋权 grant all privileges on database xxx to xxx; # 只读权限 CREATE ROLE readaccess; GRANT USAGE ON SCHEMA public TO readaccess; GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; GRANT readaccess TO xxx;
include /private/etc/openldap/schema/core.schema include /private/etc/openldap/schema/cosine.schema include /private/etc/openldap/schema/nis.schema include /private/etc/openldap/schema/inetorgperson.schema