How to Switch from MariaDB to MySQL in XAMPP
Despite Mr. Google's lack of assistance and the unsuccessful attempt to follow instructions for the opposite switch, this question seeks to replace MariaDB with MySQL in XAMPP. The requester prioritizes compatibility with MySQL Workbench.
Detailed Step-by-Step Guide:
Note: Ensure MySQL is stopped in the XAMPP Control Panel.
-
Download MySQL Community Server:
- Acquire the Windows 64-bit zip archive.
-
Rename Old MySQL Directory:
- Rename "C:xamppmysql" to "C:xamppmariadb."
-
Extract MySQL Archive:
- Extract the zip archive to "C:xamppmysql."
- Maintain the folder level containing "bin," "include," and other subfolders.
-
Copy my.ini:
- Transfer "C:xamppmariadbbinmy.ini" to "C:xamppmysqlbin."
-
Edit my.ini:
- Open "C:xamppmysqlbinmy.ini" in a text editor.
- Comment out the line beginning with "key_buffer" in the "[mysqld]" section.
-
Initialize and Configure MySQL (for 8.0.18):
- Open a command prompt and navigate to "C:xamppmysql."
- Initialize MySQL: "binmysqld --initialize-insecure"
- Start MySQL: "start /b binmysqld"
- Set a root password (blank) with native authentication: "binmysql -u root... q"
- Shut down MySQL: "binmysqladmin -u root shutdown"
-
Initialize and Configure MySQL (for 5.7.28):
- Follow steps for 8.0.18, replacing "binmysqld --initialize-insecure" with "binmysqld --initialize-insecure --log_syslog=0" and "binmysqld --log_syslog=0" in the start command.
-
Restart XAMPP:
- Activate Apache and MySQL in the XAMPP Control Panel.
-
Verify MySQL Version:
- Visit "http://localhost/phpmyadmin" to confirm the database server is now reported as MySQL Community Server.
The above is the detailed content of How to Replace MariaDB with MySQL in XAMPP for MySQL Workbench Compatibility?. For more information, please follow other related articles on the PHP Chinese website!