Upgrade MySQL 5.7 to MariaDB 10.6

wbhoster

Member
Oct 1, 2022
21
2
3
Pakistan
cPanel Access Level
Website Owner
I want to upgrade my server from MySQL 5.7 to MariaDB 10.6 i want to confirm that if i upgrade it how much time it takes and can i faced any problem after upgradtion. i have 150+ website hosted on my server.
 

Attachments

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! The upgrade itself only takes a few minutes. I would expect that process to go well on your server. What we can't say is if all of your databases and code will work with the newer version, as that would be up to a database administrator to determine.

If you have standard tools like WordPress or Joomla on your sites, those will be just fine, but any custom code that interacts with the database would need to be reviewed to ensure it works with the newer version.
 
  • Like
Reactions: wbhoster

wbhoster

Member
Oct 1, 2022
21
2
3
Pakistan
cPanel Access Level
Website Owner
Hey there! The upgrade itself only takes a few minutes. I would expect that process to go well on your server. What we can't say is if all of your databases and code will work with the newer version, as that would be up to a database administrator to determine.

If you have standard tools like WordPress or Joomla on your sites, those will be just fine, but any custom code that interacts with the database would need to be reviewed to ensure it works with the newer version.
yes we have mostly wordpress sites hosted but site hosted on WHMCS like my main website.
 
  • Like
Reactions: cPRex

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
Thannks for the reply now i am going to update to MariaDB
Make sure to do a full backup prior to upgrading. You’ll be glad you did if the upgrade fails.
 
  • Like
Reactions: wbhoster and cPRex

wbhoster

Member
Oct 1, 2022
21
2
3
Pakistan
cPanel Access Level
Website Owner
From CLI: mysqldump --all-databases > some-file.sql

That will backup all the databases on the server into a file called "some-file.sql"
Thanks for the reply can u please tell me where this file will be saved on server mean what is the path of "some-file.sql" if i run command and can we restore it if i faced any problem after upgradation.
 

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
Thanks for the reply can u please tell me where this file will be saved on server mean what is the path of "some-file.sql" if i run command and can we restore it if i faced any problem after upgradation.
If no path is given it will save it to the current folder you are in.
 
  • Like
Reactions: wbhoster and cPRex

wbhoster

Member
Oct 1, 2022
21
2
3
Pakistan
cPanel Access Level
Website Owner
From CLI: mysqldump --all-databases > some-file.sql

That will backup all the databases on the server into a file called "some-file.sql"
I will create a backup of my server database using this method I want just to confirm if I upgrade today and unfortunately, the upgradation process failed due to any reason can we restore my server database which I saved by using this method if yes then how?
 

Attachments

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
If the databases were dumped to that file, you can import them using:

mysql -u root < some-file.sql