如何在 XAMPP 中将 MariaDB 更改为 MySQL?

How can I change MariaDB to MySQL in XAMPP?(如何在 XAMPP 中将 MariaDB 更改为 MySQL?)
本文介绍了如何在 XAMPP 中将 MariaDB 更改为 MySQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

A.第一件事:

  1. 先生谷歌没有帮助我找到对我的问题的任何答复以上
  2. 是的,我在这里阅读了相反问题的解决方案如何在 Windows 上 5 分钟内在 XAMPP 中将 MySQL 升级到 MariaDB(它对我没有帮助:MySQL 根本无法启动)
  3. 我不希望得到像MariaDB 更好,-停止你的愚蠢"这样的回复练习'.
  1. Mr. Google hasn't helped me to found any reply to my question above
  2. Yes, I have read a solution to the opposite question here How to upgrade MySQL to MariaDB in XAMPP in 5 minutes on Windows (and it hasn't helped me: MySQL simply doesn't start)
  3. I don't expect replies like 'MariaDB is better, - stop your silly exercises'.

B.我正在使用 MySQL Workbench,因此不希望现在或将来遇到任何不兼容问题.

B. I am working with MySQL Workbench and because of that don't want to face any incompatibilities either now or in future.

C.有人可以分享他们解决这个问题的经验(如果有的话)吗?

C. Can someone share their experience (if any) in solving this problem?

推荐答案

使用 MySQL 运行 XAMPP

以下是将 MySQL 真正集成到 Windows 上的 XAMPP 的准确分步说明.这已在 Windows 10 和 XAMPP 7.3.11 上成功测试,适用于 MySQL 8.0.185.7.28.

  • 在 XAMPP 控制面板中停止 MySQL(实际上是 MariaDB).
  • 将 MySQL 社区服务器下载为 zip 存档(Windows 64 位版本)
  • C:\xampp\mysql重命名为C:\xampp\mariadb
  • 将下载的 zip 压缩包解压到 C:\xampp\mysql.确保您提取的文件夹级别包含子文件夹 binincludelib 等.
  • C:\xampp\mariadb\bin\my.ini复制到C:\xampp\mysql\bin
  • 在编辑器中打开 C:\xampp\mysql\bin\my.ini 并注释掉 [mysqld] 中以 key_buffer= 开头的行 部分.
  • 打开命令提示符并运行以下命令:

  • 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:

对于 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

对于 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

  • 在 XAMPP 控制面板中启动 Apache 和 MySQL.

  • Start Apache and MySQL in the XAMPP Control Panel.

    这篇关于如何在 XAMPP 中将 MariaDB 更改为 MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

  • 本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

    相关文档推荐

    Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
    Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
    Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
    auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
    Sort by ID DESC(按ID代码排序)
    SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)