如何在Mac上卸载Postgresql(运行Snow Leopard) [英] How to uninstall postgresql on my Mac (running Snow Leopard)
问题描述
从10.5升级到10.6,现在重击了postgres 8.1.更糟糕的是,我尝试安装8.4,我敢肯定,这会使事情变得更糟十倍.无论如何,当我尝试启动postgres而只创建用户时,我遇到的异常是这样的:
Upgraded 10.6 from 10.5 and now postgres 8.1 is whacked. To make things worse I tried installing 8.4 which I'm pretty sure just made things ten times worse. Anyhow, the exception I'm getting when I try to fire postgres up and just createuser is this:
createuser:无法连接到 数据库postgres:无法连接 到服务器:没有这样的文件或目录 服务器在本地运行吗? 接受Unix域上的连接 套接字"/tmp/.s.PGSQL.5432"?
createuser: could not connect to database postgres: 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"?
我如何在Mac上完全摆脱Postgres的困扰,然后才能做一个重做?
HOW do I fully get rid of postgres on my Mac so I can do a do-over?
谢谢
推荐答案
问题出在我机器上的PostgreSQL帐户上.
The problem was with the PostgreSQL account sitting on my machine.
我删除了该帐户,然后按照此处的说明进行卸载:
I removed the account and proceeded with the uninstall using the instructions here:
在安装目录中,将有一个uninstall-postgresql.app文件.执行(双击)将卸载PostgreSQL安装.
In the installation directory, there will be a uninstall-postgresql.app file. Executing (double clicking) that will uninstall the PostgreSQL installation.
-
停止服务器:
Stop the server:
sudo /sbin/SystemStarter stop postgresql-8.3
删除菜单快捷方式:
Remove menu shortcuts:
sudo rm -rf /Applications/PostgreSQL 8.3
删除ini文件:
Remove the ini file:
sudo rm -rf /etc/postgres-reg.ini
删除启动项:
Removing Startup Items:
sudo rm -rf /Library/StartupItems/postgresql-8.3
删除数据和已安装的文件:
Remove the data and installed files:
sudo rm -rf /Library/PostgreSQL/8.3
删除用户postgres:
Delete the user postgres:
sudo dscl . delete /users/postgres
这篇关于如何在Mac上卸载Postgresql(运行Snow Leopard)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!