中三A105论坛

注册 登录
查看: 140|回复: 0

postgresql 命令创建数据库、用户、角色

[复制链接]

169

主题

169

帖子

603

积分

高级会员

Rank: 4

积分
603
发表于 2024-5-8 20:44:25 | 显示全部楼层 |阅读模式
eg:创建jira数据库
  1. psql -U noway -d postgres



  2. create user jira with password 'jira';

  3. create database jira owner jira;

  4. grant all privileges on database jira to jira;
复制代码
eg: 创建wiki数据库
  1. psql -U noway -d postgres



  2. create user confluence with password 'confluence';

  3. create database confluence owner confluence;

  4. grant all privileges on database confluence to confluence;
复制代码
eg: 创建conf数据库
  1. psql -U noway -d postgres



  2. create user conf with password 'conf';

  3. create database conf owner conf;

  4. grant all privileges on database conf to conf;
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回列表 返回顶部