Home > Database > Mysql Tutorial > How to Replace MariaDB with MySQL in XAMPP?

How to Replace MariaDB with MySQL in XAMPP?

Mary-Kate Olsen
Release: 2024-11-12 14:26:02
Original
833 people have browsed it

How to Replace MariaDB with MySQL in XAMPP?

How to Replace MariaDB with MySQL in XAMPP

Despite extensive research, you were unable to find a solution to switch MariaDB to MySQL in XAMPP. Although you encountered a solution for the opposite task (migrating from MySQL to MariaDB), it proved ineffective in starting MySQL.

To resolve this issue, consider the following steps:

Instructions for Integrating MySQL into XAMPP

  1. Stop MySQL in XAMPP Control Panel.
  2. Obtain the MySQL community server as a zip archive (Windows 64-bit version).
  3. Rename C:xamppmysql to C:xamppmariadb.
  4. Extract the downloaded zip archive to C:xamppmysql.
  5. Copy C:xamppmariadbbinmy.ini to C:xamppmysqlbin.
  6. Edit C:xamppmysqlbinmy.ini and comment out "key_buffer=" in the [mysqld] section.
  7. Open a command prompt and execute the following commands:

    For MySQL 8.0.18:

    • cd C:xamppmysql
    • binmysqld --initialize-insecure
    • start /b binmysqld
    • binmysql -u root
    • Enter the following commands in the MySQL prompt:

      • 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
    • 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
    • Enter the following commands in the MySQL prompt:

      • CREATE USER pma@localhost;
      • SOURCE C:/xampp/phpMyAdmin/sql/create_tables.sql;
      • GRANT SELECT, INSERT, DELETE, UPDATE, ALTER ON phpmyadmin.* TO pma@localhost;
      • q
    • binmysqladmin -u root shutdown
  8. Start Apache and MySQL in XAMPP Control Panel.
  9. Visit http://localhost/phpmyadmin to confirm that MySQL Community Server is now active.

The above is the detailed content of How to Replace MariaDB with MySQL in XAMPP?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template