PDA

View Full Version : postgreSQL big problem



bearnet2001
09-23-2008, 09:14 AM
I originally installed postgreSQL on my C:/ drive, but wanted to have the database stored on my external harddrive so uninstalled it and re-installed it on my external drive. However when I tried to re-install it doesn't accept 'postgre' as my account name, claiming that is already taken.

I've tried to:

1. write in my new account name/pass in HEM, but it doesn't accept it. It just says it will try to login/pass combo but then does not accept it.

2. completely delete postgreSQL/re-install. Doesn't work - the 'postgre' account name is already created everytime I try to create it.

3. isntalled postgreSQL without installing the service. HEM doesn't connect to postgreSQL when this is done.

So right now I have postgreSQL uninstalled. What do I do to fix this? I want to have postgreSQL installed on my external drive, but trying to simply install it there runs me into the above error.

morny
09-23-2008, 09:21 AM
When you get to the 1st password screen try using a different username. Also since your moving your database which would have been stored in C:\Program Files\PostgreSQL\PostgreSQL8.2\Data you also need to copy the files in that folder to the same location on your new drive. So if your new drive is the E drive then recreate these folders E:\Program Files\PostgreSQL\PostgreSQL8.2\Data and copy and paste the files from the Data folder on C to that location. Now before you do if you already create a blank database on previous installs there will be files already in that location so you should delete all the files first and then paste them.

Now when you get to the screen where you have to enter your username and password for the 2nd time make sure "Initialise Database Cluster" is unticked and then finish the installtion.

bearnet2001
09-23-2008, 09:48 AM
When you get to the 1st password screen try using a different username. Also since your moving your database which would have been stored in C:\Program Files\PostgreSQL\PostgreSQL8.2\Data you also need to copy the files in that folder to the same location on your new drive. So if your new drive is the E drive then recreate these folders E:\Program Files\PostgreSQL\PostgreSQL8.2\Data and copy and paste the files from the Data folder on C to that location. Now before you do if you already create a blank database on previous installs there will be files already in that location so you should delete all the files first and then paste them.

Now when you get to the screen where you have to enter your username and password for the 2nd time make sure "Initialise Database Cluster" is unticked and then finish the installtion.

edit: fixed it

I've already deleted all the data files from my first install (I deleted the entire C:/program files/postgre.../ folder). There are no files to copy, yet postgreSQL keeps rejecting my 'postgre' account name as 'already exists'.

I have tried a different username, and postgre is able to install with that username. However HEM does not accept it when I try to input it (note that I uninstalled/reinstalled HEM since first uninstalling postgre and deleting its folders on the C:/ drive).

So what do I do now?

--

edit: Hold on, I've tried just the normal install and this time it seems to be working properly, despite having failed at doing this the last 5 times I tried it. HEM will still have to accept it though.

edit2: Okay HEM is now accepting it. Everything is working fine. I have no idea why: I tried this exact thing (installing postgre on my external drive with the settings that you recommend) 4-5 times at least in the past three hours and it failed everytime before. w/e though, it works now. Thanks.

morny
09-23-2008, 09:55 AM
You do know by deleting your entire PostgreSQL folder youve deleted your database forever unless its in the Recycle bin if its not too big?

When you get to the part where you enter you username and password the 1st time it asks you do you want to choose a more secure password, make sure you choose NO for this and again choose something other than postgre. Then select the same username and password for the 2nd screen and since you no longer have a database then youll need to tick the initialise database cluster on that page.

When you get to DB control panel though even if you enter the incorrect username and password it should ask if you want to make it accept any password. Please choose yes for this and it should be fine.

bearnet2001
09-23-2008, 09:58 AM
You do know by deleting your entire PostgreSQL folder youve deleted your database forever unless its in the Recycle bin if its not too big?

When you get to the part where you enter you username and password the 1st time it asks you do you want to choose a more secure password, make sure you choose NO for this and again choose something other than postgre. Then select the same username and password for the 2nd screen and since you no longer have a database then youll need to tick the initialise database cluster on that page.

When you get to DB control panel though even if you enter the incorrect username and password it should ask if you want to make it accept any password. Please choose yes for this and it should be fine.

It's fixed now just by doing the very basic re-install of postgreSQL. I have no idea why this didn't work before as I've tried it a lot, but w/e it works now. ty