Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Installation and Postrgesql or MySQL Connection with database failed.

  • ninjavz
  • ninjavz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 8 months ago - 9 years 8 months ago #110507 by ninjavz
Ok first a brief description:
1. I have two servers (virtual), lime and loki
2. lime is where I installed limesurvey (also with PostgreSQL 8.4 and MySQL 5.1)
3. loki is where I installed PostgreSQL 9.3 and MySQL 5.1 (for testing)
4. Both servers are CentOS 6.5 (fully updated)
5. Both have selinux off (for testing)
6. Both have firewall off (for testing)

Problem:
http://lime/limesurvey/index.php?r=installer/database
When I have to register Database type and other info I enter all the information. I use all kind of combinations for Database location using IP number or hostname. I use root (mysql) or postgres (postgresql) users to connect. But I always get the error: Connection with database failed. Please check database location, user name and password and try again.

Note: I can connect from another linux with psql -h lime -U postgres -W

Then I change only to MySQL to try:
Database location: localhost -> works
Database location: 127.0.0.1 -> works (only if selinux is off, i have checked this)
Database location: lime or machineIP -> does not work: Connection with database failed. Please check database location, user name and password and try again.

I have tried everything, I checked pg_hba.conf which allows connections and postgresql.conf is ok, otherwise I could not connect with psql from the shell.

Any ideas?
I could connect to localhost with MySQL, but I really want to use a remote PostgreSQL database.
Last edit: 9 years 8 months ago by ninjavz. Reason: The -> then
The topic has been locked.
More
9 years 8 months ago #110581 by rauno_s
please check your postgres log file to diagnose the situation (/var/lib/pgsql/data/pg_log/postgresql*.log or similar). Although in my experience - there is some kind of issue indeed, please see bugs.limesurvey.org/view.php?id=9081
The topic has been locked.
  • ninjavz
  • ninjavz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 8 months ago #110632 by ninjavz
It worked now, but I do not know why or how as I did not change anything. And problems do not fix themselves.

I did a
Code:
tail -f postgresql-Thu.log
and the only error was Database does not exist and the installation on the web site went on fine.

The only thing different is that I am connecting from a computer inside the LAN. Before I was connecting thru a VPN from my home to the office. So just miy PC IP changed, but all IPs were included in the pg_hba.conf file.

I wish I could tell more, so anyone who happens to have the same problem will now how to fix it but I cannot. Maybe the problem is that when you pass the router/VPN the source IP address gets changed and pg_hba.conf would block it.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose