Hi there,
I recently purchased a subscription to Virtualmin and I am trying to get to grips with making it work. In my system I would like to use an external mysql database to take some of the load off the virtualmin server. The entire system is on aws, I have quite a lot of experience with aws and have found all of its services to be extremely reliable, in particular, I would never wish to handle the setup, configuration and management of a mysql server myself, since RDS does this so well.
It does seem to be the case that Virtualmin can use an external MySQL database, however, the instructions provided suggest that the external MySQL server must have Virtualmin installed on it too. Is it not possible for Virtualmin to connect to an external MySQL server, without Virtualmin installed on the external server?
I have tried to do this and, indeed, Webmin is able to connect, however, upon creation of a virtual server in Virtualmin, no database is created on the MySQL Server.
Thanks for your time. Laurence
Comments
Nevermind, I have managed to fix the issue. In Virtualmin, under System Settings > Features & Plugins, I checked the box for MySQL. Then created/edited a virtual server to enable mysql database for it. As soon as this was done, everything worked and I was able to install wordpress without receiving an error:
This script cannot be installed, as this virtual server does not meet its requirements : A MySQL database is needed
Submitted by andreychek on Tue, 10/04/2016 - 09:14 Comment #3
Howdy -- when using a database on a remote server, Webmin/Virtualmin should not be needed in that case.
The instructions do show using Webmin to set it up, but only because doing so via Webmin makes things simpler.
Just to be sure we're both looking at the same instructions, these here would help you set things up:
https://www.virtualmin.com/documentation/database/remote
And if you don't have Webmin on the remote system, you would need to ensure that your database is configured to allow the IP of your Virtualmin server to connect to it as root.
I know that you mentioned that Virtualmin could connect, but it might be good to test this just to be certain by trying to connect from the command line to your database server as root (which can be done with the command "mysql -u root -h MYSQL_HOST -p", then just list all the databases by running "show databases" in MySQL.
Submitted by andreychek on Tue, 10/04/2016 - 09:36 Comment #4
Great, glad you got it working! Sorry I didn't see your update prior to posting my comment there. Thanks for letting us know how you fixed it though!
Submitted by andreychek on Tue, 10/04/2016 - 09:36 Comment #5
Great, glad you got it working! Sorry I didn't see your update prior to posting my comment there. Thanks for letting us know how you fixed it though!
Thanks for your help andreychek! May i suggest an update to the docs to make that a little clearer, would just need one sentence or so explaining that an external MySQL server does not actually need Virtualmin installed on it, and that MySQL must be enabled in the Server Settings, under Features and Plugins.
Thanks again and all the best!
I have a client who uses AWS too. In webmin/virtualmin, I went into the MySQL settings and change it to use the RDS by it's DNS name (do not use the IP!) and an admin/root type account. Then when creating a virtual server in Virtualmin it just creates it on the RDS just fine rather than attempting on a local instance of MySQL. Any script installers or whatever will automatically point to the RDS.