关系型数据库与 NoSQL 数据库管理全解析
1. PostgreSQL 用户管理
在 PostgreSQL 中创建用户时,务必使用 WITH PASSWORD 选项,否则用户将无密码创建,这会造成安全漏洞。例如,创建用户时应明确指定密码。
删除数据库用户有两种方式:
- 使用 dropuser 命令,如:
matthew@seymour:~$ dropuser msmith
DROP USER
- 登录数据库后使用
DROP USER命令,示例如下:
matthew@seymour:~$ psql demodb
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
demodb=# DROP USER msmith ;
DROP USER
demodb=# \q
2. PostgreSQL 权限管理
在 P
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



