PostgreSQL installation failure data directory error

Asked By 1230 points N/A Posted on -
qa-featured

Hi,

I am a pgsql user. I had a problem with installing postgres8.1, the error occurs at the 4th step of installation. The error stated is as follows:

Data directory error:  The specified data directory is not empty

If you have an existing database with the same major version number, you do not need to initialize a database cluster. If you have an existing database with the same major version you need to backup your old database and create a new one.

I am wondering why this error message appeared while I am on installation process. Whenever I install by enabling the initialize database cluster, then the next three steps of installation procedure is not shown. It goes directly to start installation, after some time a fatal error arises and it shows a message account not matching and all of a sudden rolls back the process.

What I did was to try with lots of account names and lot of super user names. What might be the cause of this message? Please help me find solution.

Thank you.

Data directory error

The specified data directory is not empty.

If you have an existing database with the same major version number, you do not need to initialize a database cluster.

If you have an existing database with a different major version you need to backup your old database and create a new one.

SHARE
Answered By 0 points N/A #123270

PostgreSQL installation failure data directory error

qa-featured

Hi Greg,

When you reinstall most if not all PHP database programs, they don't remove the database directory, generally this is just to allow for easy installation in the future however as it is in your case, it sometimes causes problems.

If you're going to be using windows for the un-installation process then first

Go to navigate to Control panel and open add or remove programs, thereafter browse through you C directory and delete the Postgresql folder located in program files. Finally run command prompt as administrator

Execute the following command: net user postgres /delete

You mentioned that you had created a number of users, you might want to delete them as well, just replace postgres with the relevant user names. Then execute this command: netsh firewall set opmode disable

Reboot your computer and try running the installation again, you might want to disable UAC or run the executable as an administrator again. Just a final note windows default uninstaller is known to not uninstall programs completely, try using Revo Uninstaller http://www.revouninstaller.com its one of the best 3rd party uninstaller programs for windows.

Anyway hope this helps.

Cheers!

Login/Register to Answer

Related Questions