-
-
Notifications
You must be signed in to change notification settings - Fork 6
PostgreSQL Tips
Yoshiyuki Sakamoto edited this page Jul 2, 2019
·
1 revision
ls /usr/local/var/postgres*
$ brew install postgresql
$ postgres --version
postgres (PostgreSQL) 9.5.3
$ initdb /usr/local/var/postgres9.5.3 -E utf8
$ postgres -D /usr/local/var/postgres9.5.3 &
$ pg_ctl -D /usr/local/var/postgres9.5.3 start
$ pg_ctl -D /usr/local/var/postgres9.5.3 stop
psql -l
postgresユーザーを作りたい
$ createuser -P postgres
Enter password for new role:
Enter it again:
- owner: postgres
$ createdb lgtmoon -O postgres
$ psql -U postgres lgtmoon < sql/create.sql