I hope I post this in the right forum.
I’m using Virtualmin 5.05 on CentOS Linux 7.3.1611.
I am having trouble installing Roundcube on a subdomain.
I am using install scripts.
The script fails with the following error:
“Database connection failed: DBI connect failed : Access denied for user ‘xxx’@‘localhost’ (using password: YES) 1427.”
The user xxx is actually the Administration user of the main domain.
Passwords are stored encrypted.
What have I tried to fix this?
google, google, google, to no avail, I only found one message here in the forum from several years ago from someone having the same problem (but the solution given there did not work)
while running the install script, I have both tried to use the MySQL database of the subdomain (it is called webmail) as well as the newly generated one (called webmail_roundcube)
I have made sure that the user xxx has rights in the webmail database, by going to Webmin > Servers > MySQL Database Server > User Permissions as well as Database Permissions:
- the user has nearly-everything privileges in this database, on both localhost as % (any)
- the user has read-only-privileges in all other databases, just to be sure, on both localhost as % (any)
While testing, I removed the user, the database, and recreated them, through mysql (while being logged in as root), using the same password as I used creating the virtual host
I verified that I can log in in MySQL Workbench on my laptop with these credentials and made sure that the privileges are set just right
I verified that the encrypted password which is stored in mysql is the same that is stored in the domain-file in /etc/webmin/virtual-server/domains/ (and it is)
I examined the perl script /etc/webmin/virtual-server/latest-scripts/roundcube.pl to see what variables are used there. My knowledge of Perl does not go very far, but I am able to view the variables being used and it sure looks like $dbpass is empty
So, maybe what causes this:
the install script does not use the password??
the install script cannot use an encrypted password??
or is there something completely different going on?
I’ve been working on this for five or six hours now and I cannot figure this out, I hope this makes sense to someone and that someone has the clue
today I tried two more things:
I altered the roundcube.pl script to not use the password from the domain information, I substituted $dbpass with the encrypted password (did not work)
I did the same but now with the normal password (this did the trick!!)
So, conclusion, it looks like the roundcube.pl script cannot work with encrypted passwords (which, in my opinion, is the only way you should store passwords on your server, but that’s another story)
It is true. RoundCube script will not work IF your domain (virtual server) use encrypted password storing.
If this is fresh setup, then delete virtual server and edit Server Template files. Create new virtual server.
This is simple to install RoundCube manually.
Create sub-server… for example mail.domain.com
Download RC complete package from RC official website.
Upload all content of downloaded ZIP/TAR to sub-servers public_html directory.
Be sure all required OK’s are green.
Fill the required fields to setup RC
Delete installation directory from public_html.
It was working for me.
Please look also here and make a howto if possible for Forumusers?
I don’t use roundcube…
Finally i got it! My first attempt to install roundcube was unsuccessful, leaving behind an empty database by the name account-name_roundcube. All you have to do is click on Virtualmin / Edit databases / select the roundcube database / Manage Database / Execute SQL.
GRANT ALL PRIVILEGES ON account-name_roundcube.* TO adminuser@localhost IDENTIFIED BY ‘password’;
OF COURSE, first you have to edit script with your real account name, user and password!
Then, run the install script once again and surprise! Roundcube installed!
Greetings. I have had the same problems installing the roundcube script for virtualmin but I have already solved it.
After installing the scriptover some virtual host, a database is created correctly and installed correctly, but the message appears:
“… Error establishing connection database …”
The file “public_html / roundcube / conf / conf.inc.php” contains the connection configuration to the roundcube database.
(Note: “roundcube” is the directory where I suppose you installed the script.)
I have detected that some passwords are not properly inserted in the script (they just do not work when they have special characters).
To solve this problem, simply modify the password of the “conf.inc.php” file with a simpler password. You must also access the “database user’s permissions” to change the same password from the Virtualmin panel.
With this, the “database connection error …” error disappears.
I hope it helps and is modified for the next updates of Virtualmin.