Start/Stop PostgreSQL on Mac

前端之家收集整理的这篇文章主要介绍了Start/Stop PostgreSQL on Mac前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


Start Postgresql:

sudo -u postgres /Library/Postgresql/9.6/bin/pg_ctl -D /Library/Postgresql/9.6/data start

Stop Postgresql:

sudo -u postgres /Library/Postgresql/9.6/bin/pg_ctl -D /Library/Postgresql/9.6/data stop

Stop Postgresql from auto-starting on reboot:

sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.6.plist

Make Postgresql auto-start on reboot:

sudo launchctl load -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.6.plist


Mac启动时,不自动启动postgresql,也可以作为停止postgresql的命令:

sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.6.plist


自动启动postgresql,也可以作为启动postgresql的命令:

sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.6.plist

猜你在找的Postgre SQL相关文章