News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Having problems using postgresql .

Started by gamey, July 29, 2014, 03:24:53 AM

Previous topic - Next topic

gamey

I've used mysql/mariadb plenty in the past but I've almost never used postgres.  My VPS has mysql installed, but I have reason to believe the tables may have some sort of consistency issue so I installed postgres.

Now I suspect I have setup postgres properly but it still isn't working.  I have a superuser account with a password, but the install.php keeps telling me invalid username.  How do I even know it is trying to connect to postgres instead of mysql?  Maybe I should turn off the mysql server and see ?  Too bad /etc/init.d/mysql stop doesn't work...

edit - Ok, I removed the mysql entry in the array from install.php.  I then had to apt-get install php5-pg or something.  So now it just won't authenticate with postgres.  Is there a simple list of commands how to create the user properly for postgres ?

edit2 - So I tried creating a 2nd account and this is what I get
Critical Error!
Cannot connect to the database server with the supplied data.

If you are not sure about what to type in, please contact your host.

Arantor

That sort of implies that the credentials are wrong. I know there's historically been issues with connecting on non-default ports.

However, I would also note that MySQL is not only the original database for which everything was built in 1.1.x (and thus 2.0 is a superset), it's the reference implementation across all platforms, and PostgreSQL has never really had the time spent with it for debugging and optimisation that MySQL has had.

I would honestly suggest finding out what the problems with MySQL are rather than trying to switch to PostgreSQL, if nothing else because there are so many more people that have the skills to help.

gamey

Quote from: ‽ on July 29, 2014, 04:22:37 AM
That sort of implies that the credentials are wrong. I know there's historically been issues with connecting on non-default ports.

However, I would also note that MySQL is not only the original database for which everything was built in 1.1.x (and thus 2.0 is a superset), it's the reference implementation across all platforms, and PostgreSQL has never really had the time spent with it for debugging and optimisation that MySQL has had.

I would honestly suggest finding out what the problems with MySQL are rather than trying to switch to PostgreSQL, if nothing else because there are so many more people that have the skills to help.

Understood and thank you for your thoughtful reply.  I basically have an application using mysql on the vps that is waiting for me to have time to set it back up.  It is using old  mysql binary files that I copied in place which works but gives errors.  That application works enough for my needs, but I don't want to start a new smf instance off of what might be a broken mysql install just to have issues later.  I also don't want to reinstall the other app elsewhere. 

I have noticed that SMF doesn't really have much discussion about postgresql except to say that it is supported.  Sigh.  Yea, it does seem to be a credential problem...  I was hoping there was a wiki/doc somewhere that talked about the basic steps to get postgres going...

Arantor

That's because it's only just supported, even to the point of the abstraction layer just taking MySQL queries and hammering them to fit PostgreSQL syntax.

I understand your frustrations but I would still encourage identifying the fault with MySQL before trying to isolate the fault with SMF/PostgreSQL.

Oldiesmann

Like Arantor, I would also recommend figuring out what's going on with MySQL instead of trying to blindly switch to another database system that you know absolutely nothing about. Did you actually give this user access to the database? If so, try connecting to the database as that use from the shell (psql -U username -W password database) and see what error it gives you. If not, see http://www.postgresql.org/docs/current/static/sql-alterrole.html for info on how to do so.
Michael Eshom
Christian Metal Fans

Advertisement: