change mysql to mariadb

skym4n

Verified User
Joined
Aug 1, 2020
Messages
99
Location
Brazil
I did the standard installation of directadmin, it didn't give me the option to choose between mysql and mariadb, how do I change it? the server is still being tested, is it worth doing a new installation with the custom build?

I have some databases created, but if there is an error there is no problem, because I am just testing the directadmin panel.
 
Last edited:
Check /usr/local/directadmin/custombuild/options.conf. You should be able to enable it from there. Then run:

Code:
/usr/local/directadmin/custombuild/build/mariadb
 
#MySQL Settings
mysql=5.7
mariadb=10.4
mysql_inst=mysql <- ( should i put mariadb here? )
mysql_backup=yes
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

after changing, run the command

Code:
/usr/local/directadmin/custombuild/build/mariadb
 
Mine has this so yes and yes ./build mariadb

Code:
mysql_inst=mariadb
 
latest version mariadb is 10.15, but in custom build is 10.14.
can I change it to 10.15? or may have a problem installing?
 
You can try it. If its available then it will install it.
 
after changing, run the command
I've done this in the past and ran into issues.
Create a backup first.

After changing, first do the
./build update
command again, just to be sure all changes are detected.
After that, first stop mysql. You might best do this from DA so it will not start automatically again. Forgetting to stop mysql first got me into trouble twice. It might be foolproof now, but it's better safe then sorry.

Once mysql is stopped, use the ./build mariadb command to build it.
Code:
cd /usr/local/directadmin/custombuild
./build mariadb

Be aware of various changes between Mysql 5.7 and MariaDB, so have a good look if you want to go directly to 10.4 or maybe rather would like to convert to 10.2 or 10.3.
 
Back
Top