XAMPP - Replacing MariaDB with MySQL

13 Aug 2017

The latest version of XAMPP contains MariaDB instead of MySQL.

But MariaDB is not 100% compatible with MySQL and can be replaced with the “orginal” MySQL server.

Requirements

Backup

Installation

[mysqld]
# Set basedir to your installation path
basedir=c:/xampp/mysql

# Set datadir to the location of your data directory
datadir=c:/xampp/mysql/data

# Default: 128 MB
# New: 1024 MB
innodb_buffer_pool_size = 1024M

Initializing the data directory

cd c:\xampp\mysql\bin
mysqlcheck.exe -u root -p --auto-repair --all-databases

Update structure to latest version:

mysql_upgrade.exe -u root -p --force

Restart the MySQL service, after the mysql_upgrade.exe command, otherwise there might be errors.

Check the tables for errors:

mysqlcheck.exe -u root -p --check --all-databases

Notice: If you don’t want to copy and migrate the old data directory, you can create a fresh directory with this command:

c:\xampp\mysql\bin>mysqld.exe --initialize-insecure --basedir=c:\xampp\mysql --datadir=c:\xampp\mysql\data

Finished

Known issues

Questions

Answers

Comments