Configure webmin to connect to remote mysql server

SYSTEM INFORMATION
OS type and version AlmaLinux 9.4
Webmin version 2.202

Is there a way to configure /etc/webmin/mysql/config to connect to and manage a remote database instead of localhost? I set up a dedicated mysql server and disabled mariadb on the web server for performance reasons, but would still like to have webmin’s tools to manage it if possible.

Thanks.

may be editing the database settings would help IDK


I’m guessing you should be able to manage the database once you have set this up.
to be fair I handle all the connections to remote mysql servers programmatically and manage the mysql server on it’s parent server

Where do you see that? When I go to webmin → Servers → MySQL Database Servers this is what I was seeing:

Nothing like your screenshot, and I couldn’t find anything like that in virtualmin either.

However, Claude Sonnet 3.5 got it working for me, it’s pretty straightforward. It had me edit:

/etc/webmin/mysql/config

Add in these lines (and change login= if you want to use someone other than root):

host=your_remote_server_ip_or_hostname
port=3306  # or whatever port your remote MariaDB is using
pass=your_remote_mysql_password

Comment out these lines:

# stop_cmd=systemctl stop mariadb
# start_cmd=systemctl start mariadb
# my_cnf=/path/to/remote/my.cnf
# mysql_data=/var/lib/mysql

and then restart webmin:

systemctl restart webmin

Worked like a charm. :slight_smile:

you didn’t look in the right place virtualmin->domain-edit databases

glad you got it fixed

Trust me, I looked:

That option is still not there. It’s all good though, thanks.

I guess that is because you shut down maria IDK but just out of interest what performance issues were you getting with maria over mysql ?

No, it’s mariadb on the dedicated server as well, it was the issue of running the database server on the same machine as the webserver. I split them to 2 machines, one optimized for web services and one for mysql (mariadb).

one thing to point out here mysql need to be installed on the virtualmin server else you get this error

so my attempt failed :person_gesturing_no:

It is installed and all of the tools are on there, it’s just not running.

  • I am not sure if you logged in with admin account because the menu item might not be there because of permissions.
  • If you have swapped from mariadb to mysql, maybe you have to run re-check virtualmin configuration.
  • Refresh the template/empty cache
  • does the virtual server have database feature enabled?
  • It could be a bug?

You’re talking about Virtualmin. OP is talking about Webmin, I think?

@mvandemar you need to go to Module Configuration in the MariaDB module. Click the gear icon (:gear: ) in the upper left, and select Server Connection in the dropdown.

1 Like

@Joe Awesome, thanks. :slight_smile: It’s picking up the manual edits I made so I know now where to go to manage it. I appreciate it.

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