However, after installing MariaDB, Webmin and Virtualmin no longer able to manage the MariaDB. When navigating to Webmin -> Servers -> MySQL Database Server, the following error message is shown:
The MySQL startup script /etc/rc.d/init.d/mysqld was not found on your system. Maybe MySQL is not installed, or your module configuration is incorrect.
The package can be automatically installed by Webmin. Click here to have it downloaded and installed using YUM.
Cause
The reason the error occurred because the native MariaDB and MySQL distributions come with mysql.server startup script, which would be installed with the name “mysql” in the /etc/init.d directory automatically in Linux systems using RPM package (MariaDB-server-VERSION.rpm), such as Red Hat Enterprise Linux (RHEL), Fedora, CentOS, Scientific Linux and etc.
However, some vendors provide RPM packages that install a startup script under a different name such as “mysqld”. In fact, it’s such a common practice to install MySQL startup script as “mysqld” that Webmin is looking for mysqld by default for the MySQL startup script name.
Solution
Login to Virtualmin or Webmin, then go to Webmin -> Servers -> MySQL Database Server, then click on Module Config at the top left corner.
Then, select System configuration at the “Configuration category” drop down list. It’s also possible to click on Prev or Next button until arriving at the correct category.
Change the path and name to the correct MariaDB startup script for Command to start MySQL server and Command to stop MySQL server. Normally, the values should be:
Command to start MySQL server: /etc/rc.d/init.d/mysql start
Command to stop MySQL server: /etc/rc.d/init.d/mysql stop
Click on “Save” button when done, and Webmin will allow management and configuration of MySQL and MariaDB right away.