transfer from server with mariadb 10.3 to server with mysql 8.0

Operating System & Version
Ubuntu 20.04
cPanel & WHM Version
102

bitpt

Active Member
Sep 28, 2006
43
5
158
When try transfer from a server with Mariadb10.3 to Mysql 8.0 transfer in some databases got error and do not work.
However, when do a fullbackup and a restore work always well.
Now i need transfer a large site(more then 200G) and transfer is better option (site not stop).
Anyone know why in fullbackup and restore work fine, but not in direct transfer?

Thank You!!!
 
Last edited:

bitpt

Active Member
Sep 28, 2006
43
5
158
seems user in "stream account transfer" is username and with "restorepkg" is root.

Solve this, first transfer (server load is much lower), then dump db with root permissions.

Account transfer needs an option to allow restore with root or any other mechanism or option that allows transferring the db without issues.
 

Steini Petur

Well-Known Member
Apr 24, 2016
99
25
68
Iceland
cPanel Access Level
Root Administrator
Hi,
Please note that if you have a large server, you may run into much more than a brick wall when going over from 10.3 to 8.0


These were just the few issues we ran into, I had to help clients with databases which had TEXT DEFAULT which are not allowed in 8, what you may not realize is if you are restoring 100's upon 100's of databases and accounts you may miss the text when it just didn't add the database for John or Jane..

I will be doing another set of 6 servers for our company but I will be staying away from MySQL 8.0!, Ill start at 10.3 MariaDB and go with it, remember if you do 8.0 you cant roll back.

My best way to do this especially if its many accounts is to do this

Backup in commandline
for x in `ls /var/cpanel/userdata`; do /scripts/pkgacct $x; done

Once done, I like to move them fast so
for x in `ls -arth /home | grep tar.gz`; do rsync -avh --progress -e 'ssh -p (port) -T -o Compression=no -x' $x [email protected](IP):/home/; done

Then just loop through them to restore
for x in `ls /home | grep tar.gz`; do /scripts/restorepkg --unrestricted --force --allow_reseller $x; done

Just my two cents, and careful with MySQL 8.0 cant stress the hell I was in for 2 nights straight. Remember if you are not in Console and an SSH session, do this in screen, so you can get back to it with screen -r in case you lose the connection. Also remember that doing things with backup tool cpbackup, it relies on your system load so it can constantly pause for a while when it's waiting for load to go down, pain in the ass, didn't have that issue with pkgacct but it also can be tweaked in WHM > Tweak
 
  • Like
Reactions: bitpt

bitpt

Active Member
Sep 28, 2006
43
5
158
I already migrate all dbs and is working fine.
If you want find what happened for this stream migration fail, thats ok, but pls don't migrate again, server already working after dumping dbs.

Can you send ticket link or submit a normal ticket?
 
Last edited:

Esquio

Member
Feb 29, 2016
23
5
53
Spain
cPanel Access Level
Root Administrator
This is a shame. I buy a new server that is different than others due AlmaLinux 8 and cPanel 104 has not MariaDB on the selector like others, it installs mysql 8 by default. MySQL 8 is somekind of crap, comparing to MariaDB 10.3 that is better in all aspects. I don't know why cPanel adopts that decision, maybe commercial topics.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,787
406
438
Finland
cPanel Access Level
Root Administrator

Esquio

Member
Feb 29, 2016
23
5
53
Spain
cPanel Access Level
Root Administrator
Yes it install MySQL 8 by default but when you install cPanel you can choose MariaDB to be installed, read here:
Yes, I read it above, but I think it's a regression with what we have in previous versions, that not needs config files and terminal intervention to allow the mariadb installation, it comes by default and we can choose it.
However, I read it now, but when I purchase the new server and encounters that problem, I have to hurry to prepare the server and I not repaired on "maybe new cpanel replaces the web UI with parameters on config files", to check it out if exists. I work with cPanel since 2014 and it's the first time that I encountered this.