{"id":10205,"date":"2024-08-14T11:00:54","date_gmt":"2024-08-14T02:00:54","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=10205"},"modified":"2024-08-14T11:24:27","modified_gmt":"2024-08-14T02:24:27","slug":"php%e3%81%a7postgres%e3%81%aedb%e3%81%ab%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b%e9%9a%9b%e3%81%ae%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ab%e5%af%be%e5%87%a6","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=10205","title":{"rendered":"php\u3067postgres\u306eDB\u306b\u63a5\u7d9a\u3059\u308b\u969b\u306e\u30a8\u30e9\u30fc\u306b\u5bfe\u51e6"},"content":{"rendered":"\n<p>EC-CUBE\u306e2.1\u7cfb\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u306e\u3068\u3053\u308d\u3067\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f<\/p>\n\n\n\n<p><code>MDB2 Error: connect failed [Error message: unable to establish a connection<\/code><\/p>\n\n\n\n<p>php\u3067\u3001postgres\u306eDB\u306b\u63a5\u7d9a\u3059\u308b\u969b\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f<\/p>\n\n\n\n<p>Warning: pg_connect(): Unable to connect to PostgreSQL server: authentication method 10 not supported in \uff5e<\/p>\n\n\n\n<p>\u8272\u3005\u8abf\u3079\u3066\u3044\u308b\u3068\u3001php\u304c\u5165\u308c\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u53e4\u304f(5.6.4)\u3001postgres\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u6697\u53f7\u5316\u306escram-sha-256\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u6a21\u69d8\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3067\u5bfe\u5fdc<\/p>\n\n\n\n<p>pg_hba.conf\u3092\u7de8\u96c6<\/p>\n\n\n\n<p>local &nbsp; all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scram-sha-256<\/p>\n\n\n\n<p>\u2193<\/p>\n\n\n\n<p>local &nbsp; all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; md5<\/p>\n\n\n\n<p>postgresql.sql\u3092\u7de8\u96c6<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u306b\u5909\u66f4<\/p>\n\n\n\n<p>password_encryption = md5<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e2\u3064\u306epostgres\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u5f8c\u3001postgres\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u518d\u8d77\u52d5<\/p>\n\n\n\n<p>\u305d\u306e\u5f8c\u3001postgres\u306eDB\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4<\/p>\n\n\n\n<p>ALTER USER username WITH PASSWORD &#8216;your_password&#8217;;<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u5f8c\u3001\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u7121\u4e8b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EC-CUBE\u306e2.1\u7cfb\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u306e\u3068\u3053\u308d\u3067\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3057\u305f MDB2 Error: connect failed [Error message: unable to establi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144,170,131],"tags":[],"class_list":["post-10205","post","type-post","status-publish","format-standard","hentry","category-php-","category-postgresql","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/10205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10205"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/10205\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}