XAMPP - Replacing MariaDB with MySQL 8

Daniel Opitz
Daniel Opitz
17 Nov 2019

The latest version of XAMPP contains MariaDB instead of MySQL.

But MariaDB is not 100% compatible with MySQL and can be replaced with the “original” 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

# Default since MySQL 8: caching_sha2_password
default_authentication_plugin=mysql_native_password

[client]
ssl-mode=DISABLED

Initializing the data directory

Important: Don’t skip this step!

Note: You need to open the console (cmd) as Administrator.

Change into the mysql\bin directory.

cd c:\xampp\mysql\bin

Create a “data” directory.

mkdir c:\xampp\mysql\bin\data

Initialize the data directory.

mysqld.exe --default-authentication-plugin=mysql_native_password --initialize-insecure --basedir=c:\xampp\mysql --datadir=c:\xampp\mysql\data

Start the MySQL service in your XAMPP Control Panel or run C:\xampp\mysql\bin\mysqld.exe.

Data restore

Import the SQL dump file into the new database.

Done.

Known issues