How to Migrate MySQL to MariaDB on CentOS: Step‑by‑Step Guide
Learn a concise, five‑step process to safely replace MySQL with MariaDB on a CentOS system—including backup, removal of MySQL packages, downloading and installing MariaDB RPMs, restarting the service, and confirming compatibility with existing tools like phpMyAdmin.
1. Backup
First, back up all data to ensure safety. Details of the backup process are omitted.
2. Remove MySQL packages
yum remove mysql-*Uninstall all MySQL‑related packages.
3. Install MariaDB
mkdir /Download
cd /Download
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-client.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-common.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-compat.rpm
wget http://yum.mariadb.org/5.5/centos6-amd64/rpms/MariaDB-5.5.33a-centos6-x86_64-server.rpm
rpm -U MariaDB*Download the appropriate MariaDB RPMs for your CentOS 6 64‑bit system; other versions are available at http://yum.mariadb.org/.
4. Restart MariaDB
After installation, the service name changes from mysqld (MySQL) to mysql (MariaDB).
chkconfig mysql on
service mysql restart5. Summary
MariaDB works with the same commands as MySQL, and tools such as phpMyAdmin continue to function. Always back up your data before upgrading.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
