psql

1、sudo passwd postgres

2、sudo -u postgres createuser -P django_login

3、su postgres

4、psql

5、CREATE DATABASE django_db OWNER django_login ENCODING 'UTF8';

6、CREATE USER dbuser WITH PASSWORD 'password';

7、GRANT ALL PRIVILEGES ON DATABASE exampledb to dbuser;

posted @ 2016-01-24 21:03  lyjsy  阅读(175)  评论(0编辑  收藏  举报