Install scripts errors

OS type and version Ubuntu 22.04
Virtualmin version 7.5


I have changed my default database server in virtualmin to an external database.

Now when I install a script (Roundcube), I get the following error:
Failed to run database setup script : ERROR 1698 (28000): Access denied for user ‘user’@‘localhost’ .

Roundcube’s database is installed on the external database server but no tables are created in the database.

When I go to the url of the Roundcube webmail, I get an internal error text and see it in Roundcube’s error logs:
DB Error: [1146] Table ‘domain_roundcube.session’ doesn’t exist

Anyone any idea where I can find any error logs or anyone any idea where I can fix it?

ok you need to edit the roundcube config file
go to the roundcube install you will find a directory called config
navigate to there then edit the file
find the line that starts with $config['db_dsnw'] you will see it says localhost in the string replace this with the ip or domain name of the remote database server that should work as long as the remote database has the same name
if you need some more help pm me
edit :
you will need to set up the correct user name & password for the user on the remote database server
your line should look like
$config['db_dsnw'] = 'mysql://bill:gates@localhost/roundcube_database';
say the remote database user is eddie and his password is jobs and the database is called roundcube_remote and the ip of the remote database server is
the new line would be
$config['db_dsnw'] = 'mysql://eddie:jobs@';
but if your using a host name rather than an IP address and the hostname is
the new line would be
$config['db_dsnw'] = 'mysql://';
don’t forget to open up port 3306 on the remote database server also all you need is the TCP option opened


Thanks for the explanation but in the config file the domain name of the remote db server is already in the connection string, that’s the domain name I used to add the database server to virtualmin and so that domain name works.
But during installation, roundcube’s installation script created a database but no tables. When installing roundcube with a local database, the script does.

Port 3306 is also open in the firewall. Connecting to that database server from MySQL Workbench works perfectly.

Just lmport the database from the local to remote … i did this today it worked fine

I was able to solve it, thanks.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.