TrulyOne

How to run MySQL on XAMPP

Author: tomnyone
Published: August 22, 2021
Category:
Tags: ,,

How to run MySQL on XAMPP

How to run MySQL on Xampp: Here are the step by step instructions for truly integrating MySQL into XAMPP on Windows. This has been successfully tested with Windows 10 and XAMPP 7.3.11 for both MySQL 8.0.18 and 5.7.28.

  • Stop MySQL (which actually is MariaDB) in the XAMPP Control Panel.
  • Download the MySQL community server as zip archive (Windows 64 bit version)
  • Rename C:\xampp\mysql to C:\xampp\mariadb
  • Extract the downloaded zip archive to C:\xampp\mysql. Make sure you extract the folder level which has the subfolders bin, include, lib etc.
  • Copy C:\xampp\mariadb\bin\my.ini to C:\xampp\mysql\bin
  • Open C:\xampp\mysql\bin\my.ini in an editor and comment out the line starting with key_buffer= in the [mysqld] section.
  • Open a command prompt and run the following commands:

  • For MySQL 8.0.18: cd C:\xampp\mysql bin\mysqld --initialize-insecure start /b bin\mysqld bin\mysql -u root CREATE USER pma@localhost; SOURCE C:/xampp/phpMyAdmin/sql/create_tables.sql; GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON phpmyadmin.* TO pma@localhost; ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY ''; ALTER USER pma@localhost IDENTIFIED WITH mysql_native_password BY ''; \q bin\mysqladmin -u root shutdown

  • For MySQL 5.7.28: cd C:\xampp\mysql bin\mysqld --initialize-insecure --log_syslog=0 start /b bin\mysqld --log_syslog=0 bin\mysql -u root CREATE USER pma@localhost; SOURCE C:/xampp/phpMyAdmin/sql/create_tables.sql; GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON phpmyadmin.* TO pma@localhost; \q bin\mysqladmin -u root shutdown
  • Start Apache and MySQL in the XAMPP Control Panel.
  • Go to http://localhost/phpmyadmin and verify that your database server is now reported as MySQL Community Server.

Check our other articles:

How to Change Drive at the Command Line

Similar Articles

Read into our Amazing Blog to find out our best practices and how to keep your Online Presence at the Top!

May

17

2022

Breaking the Code

Coding is such a beautiful exercise that help boost your thinking by pumping more than usual blood from your heart to your brain.

Aug

22

2021

How to Change Drive at the Command Line

How to change drive at the command line. This is going to be a very short how-to article.

May

02

2021

How to build CV, Resume from LinkedIn