Page 1 of 2

uni-installing PostgreSQL

PostPosted: Fri May 09, 2008 6:18 am
by Timmehhh
In order to use PT3 I am going to uni-install my PostgreSQL. Anyone knows how I can preserve my PostgreSQL PT2 database? I am uni-installing PostgreSQL because of this problem viewtopic.php?f=16&t=3841

Kind regards,
Tim

Re: uni-installing PostgreSQL

PostPosted: Fri May 09, 2008 12:15 pm
by Timmehhh
anyone?

Re: uni-installing PostgreSQL

PostPosted: Sat May 10, 2008 12:25 am
by APerfect10
Do not uninstall. It will only create more problems than it resolves :)

Is the problem that you forget your login information? I am not sure I understand where the problem lies.

If you do not remember your password, you can configure PostgreSQL to not require it.

Go Start->Programs->PostgreSQL->Configuration Files->Edit pg_hba.conf

At the bottom of this file there are two lines that end with 'md5'. Change both 'md5' to 'trust'. File->Save.

Then go Start->Programs->PostgreSQL->Reload Configurations

You can now proceed without entering a password.

Best regards,

Derek

Re: uni-installing PostgreSQL

PostPosted: Sat May 10, 2008 5:36 am
by Timmehhh
There is a bug with the case sensitivity of my username.

Re: uni-installing PostgreSQL

PostPosted: Sat May 10, 2008 12:04 pm
by APerfect10
Timmehhh wrote:There is a bug with the case sensitivity of my username.


Have you read this post from bugsbunny where he provides a way to change your username?

Best regards,

Derek

Re: uni-installing PostgreSQL

PostPosted: Sun May 11, 2008 12:01 pm
by Timmehhh
Yes, I did now thanks!
However I have now some problems with implementing the username change.

Re: uni-installing PostgreSQL

PostPosted: Mon May 12, 2008 6:49 pm
by Timmehhh
Okay i tried to do this
bugsbunny wrote:You can work around this:

Login using pgadmin3 using the postgres account. (Or else login in with the existing account and create a new, temporary, superuser account with full abilities).

Go down to the Login Roles section and select the Timmehhh role. Right click and choose properties. Modify the name to all lower case (you shouldn't be logged in to the account that you're modifying).

Next go to the database itself, select it and right click, choose properties, and change the owner to the new, modified, name. You'll also need to go and change all the tables. It's probably easier to script this part but you can easily go through all the tables in the public schema and change the owner (if there's no current owner leave it alone).

Once done and verified you can go and delete the new,temporary, account you created. Or leave it for future emergency maintenance issues.


I created a new superuseraccount. I tried to log out the "Timmehhh" account, so I could change it. but now I can't get in my database at all. I accidently gave the Timmehhh account no permission to the database. I can't get back in the database now. What to do?
http://i29.tinypic.com/2rynd51.png

Re: uni-installing PostgreSQL

PostPosted: Mon May 12, 2008 6:56 pm
by Timmehhh
Someone please help, I can't get to my database at all. And can't play poker with my database anymore :cry: First one to help me out gets 10$ on their Full tilt account.

Re: uni-installing PostgreSQL

PostPosted: Tue May 13, 2008 1:19 am
by APerfect10
I am not sure. I think the easiest method would be to use the 'dropuser.exe' utility and then the 'createuser.exe' utility which is under your PostgreSQL/<version>/bin directory....

dropuser

createuser

Use the --superuser and --createdb options to change them from the default. Otherwise, everything else can be left as default.

Shouldn't take more than 2-3 minutes :)

Best regards,

Derek

Re: uni-installing PostgreSQL

PostPosted: Tue May 13, 2008 7:40 pm
by Timmehhh