Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4029113
  • 博文数量: 366
  • 博客积分: 9916
  • 博客等级: 中将
  • 技术积分: 7195
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-29 23:27
个人简介

简单!

文章分类

全部博文(366)

文章存档

2013年(51)

2012年(269)

2011年(46)

分类: Mysql/postgreSQL

2012-11-11 15:50:06

we are going to create a new database user and a new database. We will use the createuser and createdb commands. These are installed with the PostgreSQL database.

$ sudo -u postgres createuser -W user12
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
Password:

We create a new database user. The user is called user12 and it is created with a password (-W option).



$ sudo -u postgres createdb testdb -O user12

We create a new testdb database. We will use this database throughout the tutorial. We set the new user to be the owner of the database (the -O option).

阅读(6701) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~