DBI error remote database server connection

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Virtualmin version 7.5

Hello
I get following error when I tried to add a remote database server connection.

Failed to add database server : Connection failed : DBI connect failed : Can’t connect to MySQL server on ‘db.domain.online:3306’ (111)

The socket on the database server is on 0.0.0.0.

Or does virtualmin also need to be on that database server to act as a remote database server for the other virtualmin server?

@Jobbedf,

There are actually 3 steps to expose your MySQL/MariaDB server for usage…

  1. Open Firewall TCP port 3306

  2. Setup “bind-address” in MySQL/MariaDB configuration to “0.0.0.0”

  3. Setup a MySQL/MariaDB with permission to access the server from either “%” (any address) or a specific IP address or hostname.

The latter step can be done via Virtualmin easily on a per domain basis.

  1. Navigate to the domain from the top left…

  2. Edit Databases

  3. Remote Hosts

  4. Enter either a specific IP address, hostname or %

  5. Click “Save”

You should now be able to connect to the database with the same credentials as you would for “localhost”.

*** Affordable, Professional, Trusted Technical Assistance – tpnAssist.com ***

Hello

I have done all that but it is for adding a remote database server in Virtualmin as below.

From MySQL Workbench, I can log in with through the above screen cannot.

I managed it
image

What do you mean?

I added a remote database server & it worked & then showed up in the webmin menu … remote database connection works out of the box I would guess from this … and I have tested the connections no problems

Yes but it doesn’t work for me.
Anyone di know what it could be or can help me?

you used

I used as host ‘%’.
Oh and I user MariaDB.
Or does virtualmin also need to be on that database server to act as a remote database server for the other virtualmin server?

And I get this error when I tried to connect:
Failed to add database server : Connection failed : DBI connect failed : Can’t connect to MySQL server on ‘db.domain .online:3306’ (111)

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