How To Migrate From MySQL To MariaDB

by | May 4, 2023 | Etcetera | 0 comments

In the event you’re taking into account migrating from MySQL to MariaDB, there’s a cast case for making the switch. As one of the vital essential first database regulate tool (DBMS) platforms, MySQL has dominated the trade for a long time and remains remarkably similar.

Alternatively, organizations are slowly moving transparent of it as a result of its slower processing and inefficiency in coping with difficult wisdom. A lot of the ones organizations turn to MariaDB.

MariaDB is a newer, lightweight DBMS that provides improved capability, further cutting-edge choices, and a greater capacity to care for difficult datasets. In comparison to MySQL, MariaDB moreover boasts a further vibrant community that helps to keep its public repository up-to-the-minute and makes forefront changes.

This article is going to data you by means of migrating your wisdom from MySQL to MariaDB.

How To Exchange Databases From MySQL To MariaDB

Migrating from MySQL to MariaDB is ridiculously easy. You’ll be capable of ruin down all of the process into two essential steps:

  1. Again up your database in MySQL thru dumping it proper right into a SQL report.
  2. Log in in your MariaDB server and load the backup report to create the database.

MariaDB is acceptable with MySQL, in order that you won’t have problems migrating your database.

After migrating your database from MySQL to MariaDB and cross-checking that the tables are complete, you’ll substitute your internet web page to tug wisdom from MariaDB as an alternative of MySQL.

Able for a extra fashionable DBMS? MariaDB’s state of the art options might be simply what you want! Get began right here ✅Click on to Tweet

Must haves

Since you’re taking a look to migrate from MySQL to MariaDB, you will have to already have a MySQL database containing some wisdom you want to move.

See also  7 Absolute best WordPress Toughen Companies for 2024 (Professional Select)

Naturally, you will have to also have a reproduction of MariaDB. Although not required, this educational uses phpMyAdmin, an open-source visual device that allows you to administer MySQL and MariaDB databases the use of a web browser.

phpMyAdmin administration tool
phpMyAdmin

To get admission to phpMyAdmin, arrange each WAMPServer or XAMPP. The ones server methods come pre-installed with phpMyAdmin, MySQL, and MariaDB — the entire thing you need to watch in this educational. (XAMPP can run on House home windows, macOS, and Linux).

In the event you don’t have phpMyAdmin, don’t worry. The object accommodates the directions you’ll run for your terminal to copy the identical actions on MySQL and MariaDB.

Out With MySQL

Get began thru creating a backup of your objective database in MySQL. Get began your MySQL server and log in in your MySQL database the use of phpMyAdmin. From WAMP or XAMPP, you’ll get admission to phpMyAdmin thru navigating to http://localhost/phpMyAdmin/.

phpMyAdmin log-in page for MySQL server
phpMyAdmin log-in internet web page

Once throughout the MySQL environment, click on at the database you want to once more up. This example exports a WordPress database, which incorporates the usual WordPress tables.

WordPress database on phpMyAdmin using MySQL
WordPress database on phpMyAdmin

Click on at the Export tab above the tables, then choose the SQL construction. You’ll import it into MariaDB in a while.

Exporting WordPress database in SQL format
Exporting WordPress database in SQL construction

Click on on Transfer to procure the database backup in your local computer as a SQL report. Then again, will have to you don’t have phpMyAdmin or need the use of directions, use the following command to dump your database into an SQL report. Change your-name and your-pass at the side of your database username and password.

 $ mysqldump --user=your-name --password="your-pass" wordpress > wordpress.sql

In this case, the command creates a backup report named wordpress.sql containing the SQL code from the WordPress database.

Finally, uninstall MySQL.

In With MariaDB

First, be sure to have MariaDB put in to your native system. You won’t want to do this manually will have to you’re the use of WAMP, XAMPP, or similar distributions pre-installed with MariaDB.

Now it’s time to load the backup MySQL report into MariaDB. Prevent the MySQL server from your server admin panel. Log out of the MySQL server and into your MariaDB server (merely switch from MySQL to MariaDB when signing in to phpMyAdmin).

See also  9 Causes Why We Switched from Yoast to All in One search engine optimization
phpMyAdmin log-in page for MariaDB server
phpMyAdmin log-in internet web page for MariaDB server

On the admin panel, create a brand spanking new database. You do this in phpMyAdmin thru clicking New, giving your database a name, and clicking Create.

WordPress database on phpMyAdmin using MariaDB
WordPress database on phpMyAdmin the use of MariaDB

Click on at the logo new database you merely created, then click on at the Import tab at the top and import the backup report thru clicking the Make a selection Report or Browse selection.

Importing WordPress database
Importing WordPress database

Click on on Transfer to load the report. The process would perhaps take a while, and if all goes well, phpMyAdmin informs you that the query was once a good fortune.

Query success message
Success message

If you want to use the command line as an alternative, apply the ones steps.

Log in in your MariaDB server and create the new database as follows:

$ mysql --user=your-name --password="your-pass" -e  "CREATE DATABASE wordpress";

Load the backup report into MariaDB.

$ mysql --user=your-name --password="your-pass" --database=wordpress < wordpress.sql

After getting successfully imported the information from MySQL to MariaDB, the cursor will transform vigorous all over again.

How To Exchange Your WordPress Web page

After moving from MySQL to MariaDB, it’s time to get your WordPress site to start out out the use of the new database. To reach this, you merely will have to substitute your site’s wp-config.php report with the new database details:

// ** MariaDB settings** //

define('DB_NAME', 'database_name_here');
define('DB_USER', 'database_username_here');
define('DB_PASSWORD', 'database_password_here');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8');

/** The Database Collate sort. Don't trade this if in doubt. */
define('DB_COLLATE', '');

After you save the report, the WordPress site gets began pulling wisdom from your new database.

Updated WordPress site
Up-to-the-minute WordPress site

MariaDB and Kinsta

MariaDB is among the fastest-innovating DBMS platforms, and that construction will in all probability continue for the foreseeable longer term. At Kinsta, we consider throughout the power of MariaDB. That’s why we use MariaDB as part of our performance-driven server stack to provide superb server capability. Our internet hosting plans will let you leverage the most productive and fastest technology available.

Kinsta makes it easy to use MariaDB. You don’t have to worry about updating your database tool, cleaning the database, or checking for errors. We handle most of these nitty-gritty tasks for you so that you can point of interest on creating the most productive content material subject material for your site shoppers.

See also  Get a FREE Toy Store Layout Pack for Divi

Velocity issues! ⚡ MariaDB’s light-weight design way sooner functionality and larger capability to maintain complicated datasets. Take the bounce and degree up your DBMS recreation – this is how:Click on to Tweet

Summary

Migrating from MySQL to MariaDB is a simple process. Briefly, you need to once more up your database and uninstall MySQL, then arrange MariaDB and import your database backup.

Needless to say likelihood is that you’ll be able to stumble upon some issues while migrating from MySQL to MariaDB. For example, likelihood is that you’ll be able to get an error if the schema of MySQL does not are compatible that of MariaDB. Moreover, be sure to run mysql_upgrade when migrating from one unlock to each different. Normally, the technique to migration problems is to make stronger each and every databases to their latest permutations previous to attempting all over again.

As MariaDB continues to innovate, it’ll in all probability be a lot much less suitable with MySQL on a rudimentary stage. So, will have to you’re the use of MySQL and are taking into account moving to MariaDB for the extra benefits, we recommend doing it sooner slightly than later.

With Kinsta’s database internet hosting services and products, you’ll be able to spin up a database and use speedy, secure within connections.

The post How To Migrate From MySQL To MariaDB appeared first on Kinsta®.

WP Hosting

[ continue ]

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!