Welcome, Guest
Username: Password: Remember me

TOPIC: Installation and Postrgesql or MySQL Connection with database failed.

Installation and Postrgesql or MySQL Connection with database failed. 4 weeks 2 days ago #110507

  • ninjavz
  • ninjavz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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: 4 weeks 2 days ago by ninjavz. Reason: The -> then
The administrator has disabled public write access.

Installation and Postrgesql or MySQL Connection with database failed. 3 weeks 6 days ago #110581

  • rauno_s
  • rauno_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Thank you received: 3
  • Karma: 2
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 administrator has disabled public write access.

Installation and Postrgesql or MySQL Connection with database failed. 3 weeks 6 days ago #110632

  • ninjavz
  • ninjavz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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
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 administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.151 seconds
Donation Image