LoginSignup
0
2

More than 3 years have passed since last update.

Big Sur に変更して postgresql エラーになるときの対処

Posted at

Big Sur にアップデート後、brew doctorで出た Warning を直していたら色々と Upgrade されてしまい、postgresql 12.3_4 -> 13.0が行われました。

==> Upgrading postgresql 12.3_4 -> 13.0
==> Downloading https://homebrew.bintray.com/bottles/postgresql-13.0.big_sur.bot
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/d8d0d489637d4ef94217e
######################################################################## 100.0%
==> Pouring postgresql-13.0.big_sur.bottle.tar.gz
==> Caveats
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

このまま、rails sすると、

スクリーンショット 2020-11-15 20.22.40.png

PG::ConnectionBad
could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

お馴染みのサーバ接続エラーです。

んん??インストールしている部分をよく見ると==> Caveats(警告事項)書いてありますね!
PostgreSQLの以前のメジャーバージョンから既存のデータを移行するには、以下のように実行します。ですって😊

brew postgresql-upgrade-database

あとは、自分がかいた記事 🔽 を参照しながら、起動し直して解決しました❣️
【Mac】Homebrew を使って PostgreSQL を動かす

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2