1. Remove all MariaDB services: (link at bottom (1))
— list all services of MariaDB
$ yum list installed mariadb\*
— [OPTIONTAL] recommended . take a backup. this run on root@localhost
$ mysqldump –all-databases -p > 20180807.sql
— disable references to repository
sudo yum-config-manager –disable mariadb
— remove services
sudo yum remove MariaDB-common MariaDB-compat MariaDB-server
2. Process for error of removing MariaDB-server service: (link (2))
$
su -c ‘yum clean all && rpm –rebuilddb’
$ su -c ‘package-cleanup –problems’
$ su -c ‘yum erase MariaDB*’
(if remove MariaDB-Server fail, then run the command below:
# su -c ‘yum –setopt=tsflags=noscripts remove MariaDB*’ [QuangVT] WORKED FOR ME!
— If not success, then run this command
# su -c ‘rpm -e –noscripts Maria*’)
3. DirectAdmin custombuild 2.0 for change MariaDB to MySQL: (link (3))
$ cd /usr/local/directadmin/custombuild
$ ./build set mysql 5.6
$ ./build set mysql_inst mysql
$ ./build set mysql_backup yes
$ ./build update
$ ./build mysql
$ ./build php n
==========================
links:
(1) https://dev.mysql.com/doc/refman/5.7/en/replace-third-party-yum.html
(2) https://serverfault.com/questions/613256/yum-error-in-preun-scriptlet-when-removing-packages
(3) https://help.directadmin.com/item.php?id=240
DirectAdmin – Change MariaDB to MySQL