Replacing MySQL with MariaDB

4 posts / 0 new
Last post
#1 Tue, 04/22/2014 - 14:08
lostandfound

Replacing MySQL with MariaDB

I could not resist the urge to replace MySQL with MariaDB but, as usual, it has not gone quite to plan :s . Are there any obvious step that I have missed? After making dumps/backups and creating a new repo I took the following steps:

# service mysqld stop
# yum -y remove mysql\*

I now realised the "*" lead me to delete some required packages when I saw terminal erasing virtualmin!


# yum update
# yum install -y MariaDB-server MariaDB-client MariaDB-devel
# cp /etc/my.cnf.rpmsave /etc/my.cnf

# mysql -V

This showed that Maria DB was up and running

I then had to go through and reinstall everything that had been deleted by the daftly added "*" , which was: postfix, mailman, virtualmin-base, sysstat, webalizer. I ran Re-check Configuration and all is fine. All is running There is only one thing that I have not been able to correct/restore which is:

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.

There is no file at "/etc/rc.d/init.d/mysqld" and I have been unable to find it at all. I can start/restart/stop mysql at the command line so it is not the end of the world.

Does anyone have any suggestion as to where the mysqld has gone/is/should be? Or alternatively where I should point "Command to start MySQL server" to?

Any suggestions welcome!

Tue, 04/22/2014 - 14:22
andreychek

Howdy,

With a new database package, it may be using a different startup script.

I haven't done any work with replacing MySQL with MariaDB, but the key would be to find the startup script that MariaDB is using, and to go into Webmin -> Servers -> MySQL -> Module Config -> System Config, and in there make sure all the listed paths are correct.

-Eric

Tue, 04/22/2014 - 14:48 (Reply to #2)
lostandfound

Thank you Eric.

I had been looking at Webmin -> Servers -> MySQL -> Module Config -> System Config previously and then searching for "mysqld" on the server with no luck.

I just found a line "Some vendors provide RPM packages that install a startup script under a different name such as mysqld." @ https://mariadb.com/kb/en/mysqlserver/ so, now I have simply changed the path (as per your instructions!) and all is fixed!!!

For clarity: In Webmin -> Servers -> MySQL -> Module Config -> System Config

I changed the path from:

Command to start MySQL server /etc/rc.d/init.d/mysqld start
Command to stop MySQL server /etc/rc.d/init.d/mysqld stop

to

Command to start MySQL server /etc/rc.d/init.d/mysql start
Command to stop MySQL server /etc/rc.d/init.d/mysql stop

As always, thank you once again!

Sat, 11/05/2016 - 20:40
Kangarooo

I have only Servers->Mysql database server and there is not Module Config -> System Config

How to set up correctly MariaDB nginx on virtualmin?

I set up nginx as in

https://tjosm.com/4937/install-virtualmin-nginx-php-7-mariadb-ubuntu-16-04/

https://www.virtualmin.com/documentation/web/nginx

https://www.youtube.com/watch?v=TdC0-RHQm0M

Topic locked