Switch from mariadb to mysql 5.7

Desperados

Verified User
Joined
Jan 2, 2017
Messages
37
Hello,

im doing setup a new box,

on Installation Steps, i selected mariadb as database engine and now directadmin installed and working,

now i want switch database engine to mysql 5.7

can you help me ? how i can do this job safely ?

is this job safe ?

Best Regards,
 
Hello,

There is no sense to copy/paste the same commands from post to post and thread to thread. Please use search function.

The forums already have ready instructions on the matter. Please use your favorite search engine to find a needed subject. For example: if you add site:forum.directadmin.com into Google input area alongside with your request you will get results only from forum.directadmin.com.

e.g. https://www.google.com/search?q=mariadb+to+mysql+5.7+site:forum.directadmin.com
 
In the base (short) you have to create a database dump of your databases.
After that, stop the database daemon.
After that, remove the mariadb (like rm -rf /var/lib/mysql), change options.conf to install mysql 5.7 and then update options and install mysql. Restore your dump.
Don't forget to reinstall Roundcube afterwards just to be sure.

If it's a new server and not used yet, it's even easier.
 
Last edited:
thank you Richard,

i have old server with Centos 6 and Directadmin ( Mysql 5.6 )

im doing setup new server for transfer accounts from old server to new server,

do you suggest i use mariadb 10.4 or i should install mysql 5.7 ?

i did not worked with mariadb yet :) do you think i got in problems ?

does directadmin work with mariadb great and stable ?!
 
do you suggest i use mariadb 10.4 or i should install mysql 5.7 ?
Neither.
I've had some troubles converting from mysql 5.7 to mariadb. This should not happen anymore but it's totally not needed to convert if you're switching servers.

Firstly, decide what you want to use on the new server, either Mysql or MariaDB.
If mysql then also install mysql 5.6 on the new server, transfer accounts by using admin backup/transfer and you should have no issues. Upgrade to 5.7 afterwards via custombuild.
If you want to use MariaDB, do -not- upgrade to mysql 5.7 but keep 5.6 on the old server. On the new server, install MariaDB 10.0 and you can easily transfer the account the same way.
This way you do not need to convert anything manully so less risks.

If you upgraded already to Mysql 5.7 and you want to use Mariadb on the new server, you have to install Mariadb 10.2 on the new server, no older version.

If you want, you can upgrade from MariaDB 10.0 to MariaDB 10.1 and after that MariaDB 10.2 (best not upgrade from 10.0 to 10.2 at once).

That's how I would do it. But make a good decision first to either keep using mysql or go to Mariadb.

does directadmin work with mariadb great and stable ?!
Yes both mysql and mariadb run fine with Directadmin.

p.s. be sure to keep your admin backups until everything runs fine after transfer.
 
Just moved from a old server with mysql 5.6 to a new server with mariadb 10.2 without problems.
What i did: backup (as reseller) the user on the old server and imported on the new one.

Is this ok or will i run in problems later ?
 
Last edited:
You should be fine normally. Mostly when backupping on the old and restoring at the new server it will work fine if it works fine now too.
 
Hi Richard, thanks for confirming, my concern was more the sql database , i made the switch without doing any database upgrade.

Normally if you do a upgrade from Mysql 5.6 to MariaDB 10.2 you must make a database upgrade by command line mysql_upgrade
 
You're welcome.

Normally if you do a upgrade from Mysql 5.6 to MariaDB 10.2 you must make a database upgrade by command line mysql_upgrade
As far as I know that mysql_upgrade command is the last command to do after you upgraded via Custombuild, if not done automatically. It's safer to do like you did now via de accounts transfers.
 
Back
Top