ubuntu@i-qo8hlriu:/opt/pgsql$ pg_ctl stop
pg_ctl: no database directory specified and environment variable PGDATA unset
Try "pg_ctl --help" for more information.
报错
加入PGDATA环境变量
ubuntu@i-qo8hlriu:/opt/pgsql$ vi ~/.bash_profile
export PGDATA=/opt/pgsql/data
export PATH=$PATH:$PGDATA
ubuntu@i-qo8hlriu:/opt/pgsql$ pg_ctl
pg_ctl: no operation specified
Try "pg_ctl --help" for more information.
ubuntu@i-qo8hlriu:/opt/pgsql$ pg_ctl restart
pg_ctl: no database directory specified and environment variable PGDATA unset
Try "pg_ctl --help" for more information.
重启配置
ubuntu@i-qo8hlriu:/opt/pgsql$ . ~/.bash_profile
ubuntu@i-qo8hlriu:/opt/pgsql$ pg_ctl restart
waiting for server to shut down.... done
server stopped
waiting for server to start....2020-05-20 15:37:07.562 CST [8264] LOG: listening on IPv4 address "0.0.0.0", port 5432
2020-05-20 15:37:07.583 CST [8264] LOG: listening on IPv6 address &
linux 重启pgsql 失败,添加PGDATA环境变量
最新推荐文章于 2024-04-15 18:27:01 发布