次は初期設定をおこなっていきます。 データベースをUTF-8で初期化 以下のコマンドでデータベースの初期化をおこないます。 $ initdb /usr/local/var/postgres -E utf8 これでPostgreSQLのデータベース初期化が完了しました。 PostgreSQLの起動や停止 以下のコマンドを実行してPostgreSQLを起動させます。 $ brew services start postgresql これでPostgreSQLがMac上で立ち上がりました。 停止は以下のコマンドです。 $ brew services stop postgresql 再起動は以下。 $ brew services restart postgresql PostgreSQLを利用する準備ができました。 次にユーザー設定をおこなっていきます。 postgresユーザーの追加 デフォルト
![MacにPostgreSQLを導入する方法&初期設定をおこなう | vdeep](https://cdn-ak-scissors.b.st-hatena.com/image/square/17e72574c026a2dafb347758470425181bc8d5f5/height=288;version=1;width=512/http%3A%2F%2Fvdeep.net%2Fwp-content%2Fuploads%2F2018%2F04%2Fmac-postgresql.jpeg)