Categories: cPanel

Roundcube “DATABASE ERROR: CONNECTION FAILED!” : Re-installation!

Roundcube “DATABASE ERROR: CONNECTION FAILED!” : Re-installation!

Step 1 : Remove teh Previous installation of Roundcube at the server side with the help of below steps

====================
cd /usr/local/cPanel/base
rm -rf roundcube*
mysql
mysql>drop database roundcube;
====================

Make sure that you have root mysql password with you before further installation.

Step 2 :

====================
cd /usr/local/cpanel/base
wget http://easynews.dl.sourceforge.net/sourceforge/roundcubemail/roundcubemail-0.1beta2.1.tar.gz
tar -zxvf roundcubemail-0.1beta2.1.tar.gz
mv -f roundcubemail-0.1beta2 roundcube
cd roundcube
chmod -R 777 temp
chmod -R 777 logs
====================

Step 3 : Please do create the database. Find mysql root password from /root/my.cnf

Login as user, root.

====================
mysql -u root -p
Password:
mysql>CREATE DATABASE roundcube;
mysql>use roundcube;
mysql>source SQL/mysql.initial.sql;
mysql>quit
====================

Step 4: Need to add the configuration as below :

====================
cd config
mv db.inc.php.dist db.inc.php
mv main.inc.php.dist main.inc.php
====================

Step 5: Need to Edit the configuration files like below:

====================
using your text editor edit db.inc.php
Find:
$rcmail_config[‘db_dsnw’] = ‘mysql://roundcube:pass@localhost/roundcubemail’;
Replace with:
$rcmail_config[‘db_dsnw’] = ‘mysql://root:rootpass@localhost/roundcube’;
#vi main.inc.php
====================
Step 6: Replace the corresponding root password
====================
using your text editor edit main.inc.php
Find:
$rcmail_config[‘default_host’] = ”;
Replace with:
$rcmail_config[‘default_host’] = ‘localhost’;
====================

Need to configure cPanel to show roundcube in the theme. X theme(default) only!!

====================
cd /usr/local/cpanel/base/roundcube/skins/default/images/
cp roundcube_logo.png /usr/local/cpanel/base/frontend/x/images/roundcube_logo.png
cp roundcube_logo.png /usr/local/cpanel/base/webmail/x/images/roundcube_logo.png
wget http://www.yourserverguide.com/Files/HGpatch-roundcube-1.0BETA2.1
patch -p0 < HGpatch-roundcube-1.0BETA2.1
====================

If you receive a message stating: Reversed (or previously applied) patch detected! Assume -R? Please press N for No as this is because you previously installed roundcube

This will auto do all the necessary changes to roundcube and the X theme. Once the patch is executed you may now access roundcube via http://yourdomain/webmail


HR-ADMIN

Recent Posts

Will AI Replace Developers in the Future?

Artificial intelligence is changing the tech world at lightning speed. From automated chatbots to AI-generated applications, many people are now…

2 days ago

What is Bot Traffic? Easy Ways to Detect and Block It

Introduction to Bot Traffic Bot traffic refers to visits to a website that come from automated software programs rather than…

2 weeks ago

100+ Essential Windows Commands You Can’t Ignore

Windows may look like a point-and-click operating system, but under the hood, commands still do a lot of the heavy…

3 weeks ago

YouTube Shorts for Beginners: Step-by-Step Guide (2026)

YouTube Shorts are short-form vertical videos designed for quick consumption, typically lasting up to 60 seconds. In 2026, they’ve become…

3 weeks ago

YouTube SEO Secrets That Actually Work in 2026

YouTube SEO Secrets That Actually Work in 2026 YouTube SEO 2026 YouTube SEO Secrets That Actually Work in 2026 If…

4 weeks ago