mac如何重启postgresql

557次阅读
没有评论

mac如何重启postgresql

Mac下安装postgresql

brew install postgresql -v

初始化配置

initdb /usr/local/var/postgres -E utf8

启动

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

关闭

pg_ctl -D /usr/local/var/postgres stop -s -m fast

创建用户,创建db

createuser <username> -P
createdb <dbname> -O <username> -E UTF8 -e

连接数据库

psql -U <username> -d <dbname> -h 127.0.0.1

list数据库

\l 或不进入终端的情况下执行psql -l

更多学习内容,请点击Python学习网!

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:postgresql2022-12-02发表,共计387字。
新手QQ群:570568346,欢迎进群讨论 Python51学习