Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
4
Help us understand the problem. What is going on with this article?
@silverskyvicto

PostgreSQL のログイン時にパスワードを省略する方法

More than 3 years have passed since last update.

PostgreSQLのデータベースにログインするときにいちいちパスワードを入力するのが面倒なのでやってみたメモ

環境

OS・ミドルウェア バージョン
OS CentOS release 6.7 (Final)
PostgreSQL 9.2.24

手順

## .pgpassファイルを作成
# vi .pgpass

## 次の内容を記載
<DBサーバのホスト名>:<DBサーバのポート>:<データベース名>:<ユーザ名>:<パスワード>

# 記載したら保存する

## 権限を以下のコマンドで変更する
# chmod 600 .pgpass
4
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
silverskyvicto
Salesforce Platform や Atlassian Product を使用しています。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
4
Help us understand the problem. What is going on with this article?