Created
February 23, 2016 20:35
-
-
Save magnocosta/a972ed741c51fb14a126 to your computer and use it in GitHub Desktop.
Create User Admin Postgresql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criando um usuario admin no Postgresql | |
sudo -i -u postgres | |
createuser --superuser admin | |
# Configurando o charset do banco de dados | |
psql | |
UPDATE pg_database SET datallowconn = TRUE where datname = 'template0'; | |
\c template0 | |
UPDATE pg_database SET datistemplate = FALSE where datname = 'template1'; | |
drop database template1; | |
create database template1 with template = template0 encoding = 'UNICODE' LC_CTYPE = 'en_US.UTF-8' LC_COLLATE = 'C'; | |
UPDATE pg_database SET datistemplate = TRUE where datname = 'template1'; | |
\c template1 | |
UPDATE pg_database SET datallowconn = FALSE where datname = 'template0'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment