How to Update MariaDB on XAMPP
Last update: December 19, 2024
Updating MariaDB on XAMPP might seem daunting, but with the right approach, it’s a straightforward process. In this guide, I'll walk you through how to upgrade MariaDB to the latest version on your XAMPP installation.
1. Check Your Current MariaDB Version
First, open phpMyAdmin from your XAMPP control panel to verify your current MariaDB version. For
instance, my setup shows MariaDB version 10.4.3
, which I'll update in this tutorial.
2. Download the Latest MariaDB Version
- Head over to the official MariaDB website and click on the Download button.
- On the download page, select Show all files.
- Choose your operating system (e.g., Windows).
- Download the zip archive without the debug symbols—it’s smaller and quicker to download.
3. Prepare for the Update
After downloading the ZIP file:
- Extract its contents.
- Place the extracted files in an accessible location (e.g., your desktop) for now.
4. Backup and Prepare XAMPP
Before making changes to your MySQL setup:
- Open the XAMPP Control Panel and stop both MySQL and Apache to avoid conflicts during the update.
- Navigate to your XAMPP installation folder (e.g.,
C:\xampp
). - Locate the
mysql
folder inside this directory and rename it tomysql_old
.
5. Create a New MySQL Folder
- In your XAMPP directory, create a new folder named
mysql
. - Copy the contents you extracted from the MariaDB ZIP archive into this new
mysql
folder. There are a lot of files there, so it might take a minute.
6. Transfer Configuration Files and Scripts
To ensure your updated MariaDB setup works seamlessly:
- Open the renamed
mysql_old
folder and locate the following files and folders:- Files:
install_service
,uninstall_service
,reset_root
- Folders:
backup
,scripts
- Files:
- Copy these items into the new
mysql
folder.
7. Copy the Configuration File
- In both the old and new
mysql
folders, open thebin
directories. - From the old folder, copy the file
my.ini
and paste it into thebin
folder of the newmysql
directory.
8. Create and Populate the Data Folder
- Inside the new
mysql
folder, create a new folder nameddata
. - From the old
mysql_old
folder, open thebackup
directory. - Copy all the folders (not individual files) from the
backup
directory and paste them into the newdata
folder.
9. Restart XAMPP Services
- Return to the XAMPP Control Panel and start both Apache and MySQL.
- Open your browser, navigate to phpMyAdmin, and refresh the page.
10. Verify the Update
Once phpMyAdmin loads, you should see that your MariaDB version has been updated to the latest release.