Switch from MariaDB to MySQL with XAMPP on Windows
Background:
Despite searching the web, you have encountered difficulties finding a solution to replace MariaDB with MySQL in your XAMPP setup. This may be due to compatibility concerns with MySQL Workbench or prior attempts to upgrade MySQL to MariaDB that resulted in issues.
Solution:
Here is a detailed step-by-step guide on how to integrate MySQL into XAMPP on Windows, ensuring a successful conversion for both MySQL versions 8.0.18 and 5.7.28.
Initialize MySQL: Perform the following commands in a command prompt:
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
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
Additional Notes:
Some key differences between MariaDB and MySQL to be aware of:
The above is the detailed content of How to Switch from MariaDB to MySQL with XAMPP on Windows?. For more information, please follow other related articles on the PHP Chinese website!