Postgresql in Docker: role root does not exist解决办法

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@~]#su - postgres
Last login: Wed Apr 1 10:28:10 CST 2015 on pts/2
-bash-4.2$ psql -U postgres
psql (9.4.0)
Type "help" for help.
postgres=#create user root with password 'password';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE mydatabase to root;
GRANT
postgres=# ALTER ROLE root WITH SUPERUSER;
postgres=# \q

本文转载自