1 (edited by christophk 2016-05-24 00:14:44)

Topic: Database error: connection failed!

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5
- Linux/BSD distribution name and version: ubuntu server 14.04.4 (fresh install in a parallels VM ob OSX El Capitan)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Dear Zhang

Thanks for bringing me here after answering on my email in the sogo users mailing list.

I tried to install iredmail (together with sogo).

Unfortunately I didn't get anywhere yet.

After a fresh install in a Parallels VM on OSX El Capitan I get the following error message when I try to connect to the VM via testserver.example.com/mail:

DATABASE ERROR: CONNECTION FAILED!

Similar to:
http://www.iredmail.org/forum/topic1048 … ailed.html

But I have Nginx so I don't know if this helps.

I think, that iredmail can't connect to the MYSQL server. But I don't know how to trouble shoot this now?

Can you help me?

Greetings, Chris

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Database error: connection failed!

ok, I suppose you already did reboot the server?
Is mysql running?
use this command:
sudo service mysql status
Should give back:(this is ok)
mysql start/running, process 967

Try to connect to your database with root.
see the file in your install dir from IredMail..
in my example it was located in :
/root/iRedMail-0.9.4/iRedMail.tips

cat /root/iRedMail-0.9.4/iRedMail.tips  shows the file.
search for root Mysql.
and try to connect with:

mysql -u  root
give password on prompt.
does this work?

3

Re: Database error: connection failed!

christophk wrote:

when I try to connect to the VM via testserver.example.com/mail:
DATABASE ERROR: CONNECTION FAILED!

@phyt's reply contains some useful hints, please try it first. at least we should know whether or not your SQL account credentials are working.

*) Any related log in Postfix log file (/var/log/mail.log)? Roundcube is configured to log to Postfix log file.
*) Try to connect to MySQL server with '-h' flag like this:

mysql -h 127.0.0.1 -u root -p

Also, change sql username to others and try again. e.g. 'roundcube', 'vmail', etc. You can find all SQL account credentials in "iRedMail.tips" file.