Changing from MySQL to MariaDB adds second "MySQL Database Server" item to the "Servers" list

This is a fairly non-urgent thing. A while ago I put a private NextCloud server on my Virtualmin managed web server. One of the things they pressured me on was to upgrade from MySQL to the MariaDB (which seems like no change to me). I got sold on the long-range license of it vs Oracle.

After the change (besides losing access to all my existing databases; rrrrrrrrrrrrrr), I noticed that my Webmin tab under Servers had a "duplicate" entry for MySQL Database Server where one was to the MariaDB and it worked, and the other was to the old MySQL and didn't work.

The error message was: MySQL is not running on your system - database list could not be retrieved.

The full MySQL error message was : DBI connect failed : Can't connect to MySQL server on '192.168.1.145' (111)

As far as bugs go, this is nothing, but it should get in the queue for eventual mitigation.

Oh and also, it seemed like the order of the twin line items changed over time. Knowing which one to click was stochastic.

Status: 
Closed (fixed)

Comments

Installing a different version of MySQL shouldn't cause another module icon to show up - unless you used the System Settings -> MySQL Servers feature in Virtualmin?

WNYmathGuy's picture
Submitted by WNYmathGuy on Thu, 05/24/2018 - 11:44 Pro Licensee

No, not that, but I think it was something I did stupid a while ago. Let's call my two servers A & B where A is managed by Virtualmin and is my DMZ but B is just a data server with the minimum Webmin and Ubuntu with MySQL but is not outward facing at all.

As I look at the error message I realize the IP in question is a data server B.

I vaguely recall trying to make a connection to server B's MySQL server with the server A's interface. It didn't work cause I don't know what I'm doing enough with networking. I don't recall if I tried to connect with a Webmin tab, a Virtualmin tab, or through the phpMyAdmin interface. That extra entry must be an artifact of that botched attempt.

If you mouse over the duplicate MySQL module link, what URL does it show that it links to?

WNYmathGuy's picture
Submitted by WNYmathGuy on Sat, 05/26/2018 - 15:59 Pro Licensee

It points to:
https://MyServersName.MyDomainName.com:10000/mysql-192.168.1.145/?xnavigation=1
That internal IP is reserved on my router as a secondary data server inside the network.

WNYmathGuy's picture
Submitted by WNYmathGuy on Sat, 05/26/2018 - 16:50 Pro Licensee

Also, as I look around, I see something to maybe hint at where I went wrong.

I looked into the Virtualmin -> Edit Databases -> Remote Hosts tab. In the Allowed hosts for MySQL section, two of my 3 top-level virtual servers have % in there, and the virtual server I think I tried to connect the server B with has localhost written in there.

The different "Allowed Host" on it's own isn't a problem.

Check on the MySQL Servers page in Virtualmin to see if the second host shows up.

WNYmathGuy's picture
Submitted by WNYmathGuy on Mon, 05/28/2018 - 20:26 Pro Licensee

Damn! That was in a place I forgot about already.
Virtualmin -> System Settings -> MySQL Servers I have two line items there in the list. One "Server hostname" is Local server and it's "Used by" all my virtual servers which I gave MySQL access to, then their's the second line item with "Server hostname" 192.168.1.145 and it's "Used by" No domains. When I checked it's box and clicked the remove button, that second entry in the Webmin -> Servers section went away.

That's definitely the thing I tried to use to link that outside data source with. I thought I could just guess my way through it, then after giving up one night forgot all about it. Later on, I had no Idea how to get rid of the funny double item.

I guess I'll find another way to get the two servers to share data.