![在 phpPgAdmin 中将套接字更改为其他默认套接字](https://linux22.com/image/613931/%E5%9C%A8%20phpPgAdmin%20%E4%B8%AD%E5%B0%86%E5%A5%97%E6%8E%A5%E5%AD%97%E6%9B%B4%E6%94%B9%E4%B8%BA%E5%85%B6%E4%BB%96%E9%BB%98%E8%AE%A4%E5%A5%97%E6%8E%A5%E5%AD%97.png)
我需要更改 phpPgAdmin 在其配置中连接的套接字。
// Hostname or IP address for server. Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = '/opt/jasperreports-server-cp-5.1.0/postgresql';
$conf['servers'][0]['defaultdb'] = 'postgres';
这不起作用。留空''
也不行。
在 pg_hba.conf 中我只有以下行:
local all all trust
路径是正确的,因为我可以通过以下方式连接:
:~# psql --host=/opt/jasperreports-server-cp-5.1.0/postgresql/ --user=postgres
答案1
// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root, administrator)
// will be denied. Only set this false once you have read the FAQ and
// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = false;
该值默认为真,这就是我无法登录的原因。