6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PSequel から Homestead 上の PostgreSQL に接続するときの設定

Last updated at Posted at 2019-02-03

PSequel から Homestead 上の PostgreSQL に接続します。

動作環境

  • Mac OS X 10.14.2
  • psql (PostgreSQL) 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1)
  • Homestead v8.0.2
  • PSequel Version 1 (1.5.3)

PSequel の接続設定

Homestead では標準で PostgreSQL が使用できるので、特別な設定は必要ありません。

Host: localhost
User: homestead
Password: secret
Database: homestead
Port: 54320

psequel_setting.png

接続エラーが出る場合の対処

ポート番号の設定を「Port: 5432」としてしまうと、以下のエラーが出ます。

psequel_error.png
PostgreSQL Error
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (::

ホスト OS(Mac OS)から Homestead 上のデータベースにアクセスするには、以下のポート番号を使用する必要があります。

MySQL: 33060 → Forwards To 3306
Postgres: 54320 → Forwards To 5432

Laravel Homestead > Connecting To Databases
https://laravel.com/docs/5.7/homestead#connecting-to-databases

6
4
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
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?