Switching from MariaDB to MySQL in XAMPP
For users seeking to utilize MySQL Workbench and avoid compatibility issues, switching from MariaDB to MySQL in XAMPP is necessary. Here's an extensive guide:
Step-by-Step Instructions:
-
Halt MariaDB: Stop MariaDB in the XAMPP Control Panel.
-
Download MySQL: Acquire the MySQL community server as a zip archive for Windows 64 bit.
-
Rename Directory: Rename C:xamppmysql to C:xamppmariadb.
-
Extract MySQL: Unpack the downloaded zip archive to C:xamppmysql.
-
Copy my.ini: Transfer C:xamppmariadbbinmy.ini to C:xamppmysqlbin.
-
Modify my.ini: In C:xamppmysqlbinmy.ini, comment out the line starting with key_buffer= under the [mysqld] section.
-
Initialize and Start MySQL:
For MySQL 8.0.18:
- cd C:xamppmysql
- binmysqld --initialize-insecure
- start /b binmysqld
- binmysql -u root
- Create a user and import create_tables.sql
- binmysqladmin -u root shutdown
For MySQL 5.7.28:
- cd C:xamppmysql
- binmysqld --initialize-insecure --log_syslog=0
- start /b binmysqld --log_syslog=0
- binmysql -u root
- Create a user and import create_tables.sql
- binmysqladmin -u root shutdown
-
Start Services: Launch Apache and MySQL in the XAMPP Control Panel.
-
Verify: Visit http://localhost/phpmyadmin and confirm that your database server is now registered as MySQL Community Server.
The above is the detailed content of How to Switch from MariaDB to MySQL in XAMPP?. For more information, please follow other related articles on the PHP Chinese website!