Wishlist 0 ¥0.00

LARAGON – 迁移到 MariaDB

 

1. 引言

 

默认情况下,Laragon 预装了 MySQL。但是迁移到 MariaDB 并不是那么困难。

 

使用 Laragons 内置的快速添加选项来安装 MariaDB。

 

2. 通知

 
确保您的 Windows 10(64 位)作系统安装了最新的 Visual C++ Redistributable for Visual Studio 2015-2019
 

3. 数据呢?

 

此过程会将 MariaDB 安装到您的 Laragon 安装中。
将创建一个新文件夹。
它不会触及现有的 MySQL 数据库。\LARAGON\data\mariadb-x.x\

 

这意味着您必须:

  1. 在添加 MariaDB 之前导出所有现有数据库
  2. 安装 MariaDB 后导入所有导出的数据库
 

4. Laragon - 添加 MariaDB

 
  • 前往 MariaDB 下载并选择要安装的版本。查找最新的 Stable 版本。
  • 在 Package Type (包类型) 下,选择 ZIP file (ZIP 文件)。
  • 点击 下载 按钮并将文件保存到您的下载文件夹。
 
  • 打包的文件以 mariadb-10.6.5-winx64.zip 命名。
  • 将下载的 ZIP 压缩包解压到同名文件夹中,例如 mariadb-10.6.5-winx64
  • 将完整的 \mariadb-10.6.5-winx64\ 文件夹移动到 Laragon 安装的 \bin\mysql\ 文件夹。
 
  • 在 Laragon Button 菜单中,单击 Stop All 按钮停止所有服务。
  • 在 MySQL 部分中,选择 版本 → mariadb-x.x.x-win64
  • 在 Laragon 按钮菜单中,单击 Start All 按钮。授予对 mysql.exe 服务的访问权限。
  • Laragon 现在创建了一个新的数据文件夹\LARAGON\data\mariadb-x.x\
 

5. 检查新数据库

 

如果您尚未将 phpMyAdmin 添加到您的 Laragon 安装中,请立即按照本文中的说明进行作。

 
  • 在 Laragon Button 菜单中,单击 Database 按钮。
  • 在全新的 Laragon 安装中,默认用户为 root,并且未设置密码。
  • 选择您的首选语言并登录 phpMyAdmin。
  • phpMyAdmin 可能会抱怨 phpMyAdmin 配置存储没有完全配置。
  • 在警告中,单击链接 找出原因.

  • 在 de next notice,单击链接 创建.

  • 然后 phpMyAdmin 将创建并配置名为 phpMyAdmin 的数据库。

  • 点击 Home 按钮。警告现在应该消失了。

 

您现在已经将 MariaDB 安装到 Laragon 安装中。

您现在可以开始导入数据库。

成功导入和测试后,您可以在 中删除过时的 mySQL 文件夹:

  • \LARAGON\bin\mysql\
  • \LARAGON\data\
 

6. 字符集和排序规则

 

在某些情况下,您可能希望通过指定字符集和排序规则来配置 MariaDB UTF 8 设置。

在我的例子中,首选字符集是 utf8mb4,排序规则是 utf8mb4_unicode_ci

如果您想强制 MariaDB 使用此设置,则必须将它们添加到以下 2 个文件中:

  • \LARAGON\bin\mysql\mariadb-10.6.5-winx64\my.ini
  • \LARAGON\usr\tpl\MySQL.my.ini.tpl

在这两个文件中,将设置添加到 [mysqld] 部分:

##UTF 8 Settings
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_ci

No comments

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.