$ sudo -u postgres createuser -W dbuser 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: $ sudo -u postgres createdb testdb -O dbuser
新建数据库
CREATE DATABASE woodart WITH ENCODING='UTF8' OWNER=woodart;
CREATE DATABASE mydb ENCODING 'UTF8' TEMPLATE template0 OWNER dbuser TABLESPACE myspace;
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。