1.pg无法登录
[postgres@host-localhost data]$ psql -u kong -d kong -p 5432
psql: invalid option -- 'u'
Try "psql --help" for more information.
[postgres@host-localhost data]$ psql -U kong -d kong -p 5432
psql: error: could not connect to server: 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"?
2.解决方法
创建一个软连接,类似MySQL的mysql.sock 文件。用于本地socket方式连接。,
ln -sv /data/pgsql/12/data/.s.PGSQL.5432 /tmp/.s.PGSQL.5432