1

Topic: DATABASE ERROR! Unable to connect to the database.

1. Inside /root/iRedMail-1.6.2/, append this line in file `config`:
export USE_ROUNDCUBE=YES

2. bash iRedMail.sh

3. A line has been added. - [ INFO ] Configure Roundcube webmail.

4. mail.server.com/mail
DATABASE ERROR!
Unable to connect to the database.
Contact the server administrator.

5. /opt/www/roundcubemail/config/config.inc.php - correct SQL database, username, password.

----

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! Unable to connect to the database.

<?php

// SQL DATABASE
$config['db_dsnw'] = 'pgsql://roundcube:123456789@127.0.0.1:5432/roundcubemail';
-------------------------------------------------
root@mail:~# psql -U roundcube
Password for user roundcube:
psql (13.9 (Debian 13.9-0+deb11u1))
Type "help" for help.

roundcube=>
-------------------------------------------------------
password - 123456789

3

Re: DATABASE ERROR! Unable to connect to the database.

roundcube=> \l
Нет базы данных "roundcubemail".

4

Re: DATABASE ERROR! Unable to connect to the database.

Inside /root/iRedMail-1.6.2/, append this line in file `config`:
export USE_ROUNDCUBE=YES
root@mail:~/iRedMail-1.6.2# bash iRedMail.sh


* Start iRedMail Configurations
********************************************************************
< SKIP > Function: generate_ssl_keys.
[ INFO ] Create required system accounts.
< SKIP > Function: add_user_vmail.
< SKIP > Function: add_user_mlmmj.
< SKIP > Function: add_user_iredadmin.
< SKIP > Function: add_user_iredapd.
< SKIP > Function: add_user_netdata.
< SKIP > Function: pgsql_setup.
< SKIP > Function: postfix_setup.
< SKIP > Function: dovecot_setup.
< SKIP > Function: web_server_config.
< SKIP > Function: mlmmj_config.
< SKIP > Function: mlmmjadmin_config.
< SKIP > Function: clamav_config.
< SKIP > Function: amavisd_config.
< SKIP > Function: sa_config.
< SKIP > Function: iredapd_setup.
< SKIP > Function: iredadmin_setup.
< SKIP > Function: rcm_setup.
< SKIP > Function: fail2ban_setup.
< SKIP > Function: netdata_setup.
< SKIP > Function: cleanup.
root@mail:~/iRedMail-1.6.2#

5

Re: DATABASE ERROR! Unable to connect to the database.

How to uninstall to reinstall "roundcubemail"?

6

Re: DATABASE ERROR! Unable to connect to the database.

Or how to create a "roundcubemail" database with the necessary tables?