WAMP 服务器将 MySQL 切换到 MariaDB

2022-01-15 00:00:00 wamp mariadb mysql wampserver

如何在 WAMP 3.1.0 中将数据库从 MySQL 切换到 MariaDB?

How can I switch the database from MySQL to MariaDB in WAMP 3.1.0?

我正在找它,但我找不到它.

I'm looking for it, but I can not find it.

推荐答案

从您展示的图像看来,MySQL 和 MariaDB 都已经在运行了!

From the image you show it looks like both MySQL and MariaDB are already running!

注意:这有点耗内存!

查看 MySQL 和 MariaDB 是否都在运行的简单测试.启动 phpMyAdmin 并查看登录屏幕.如果两者都在运行,您应该会在用户名和密码字段下看到 Server Choise 下拉菜单.在那里,您将看到 2 个选项,如下所示.

Simple test to see if both MySQL and MariaDB are running. Launch phpMyAdmin and look at the login screen. If both are running you should see a Server Choise dropdown under the Username and Password fields. In there you will see 2 options like below.

要选择 MySQL 或 MariaDB,右键单击系统托盘中的 wampmanager 图标,您应该会看到这个菜单

To pick MySQL or MariaDB, right click on the wampmanager icon in the system tray and you should see this this menu

只需单击 MySQL 或 MariaDB 即可启用或禁用其中一个或两个数据库服务器.如果数据库服务器名称旁边有一个绿色勾号,就像上面针对 MySQL 的那样,则该数据库服务器已配置为运行,如果没有勾号,则该服务器未配置为运行.

Just click on either MySQL or MariaDB to Enable or Disable either or both database servers. If there is a green tick beside the database server name, like above against MySQL, then that database server is configured to run, and if no tick exists, that server is not configured to run.

或者,只需查看 services.msc 管理单元以查看数据库服务器是否 a) 已安装且 b) 正在运行(已启动)

Alternatively, just look at the services.msc snap-in to see if the database server is a) installed and b) running (started)

小记 WAMPServer 现在是 V3.1.2,更新可以在这里找到a> 这包含一个修复,如果我没记错的话,它包含一个相关的修复.这是 WAMPServer 备份存储库,但它比 SourceForge 更容易导航,并且通常比 SourceForge 更新,因为 Oto 不必跳过所有 SourceForge 循环来使其保持最新状态.

Small note WAMPServer is now at V3.1.2, the update can be found here This contains a fix that if I remember correctly, contains a relevant fix. This is the WAMPServer backup repo, but it is a lot easier to navigate than SourceForge and is often more up to date than SourceForge as Oto does not have to jump through all the SourceForge loops to keep it up to date.

另请注意:MariaDB 和 MySQL 不能同时运行在同一个端口,即 3306.因此默认情况下 MySQL 运行在 3306 上,MariaDB 运行在 3307 上.当你开始编写 PHP 代码时,你必须在你的数据库上指定端口 3307如果您要同时运行两者,则连接到 MariaDB 的连接代码.

Also note: that MariaDB and MySQL cannot both run on the same port i.e. 3306. So by default MySQL runs on 3306 and MariaDB runs on 3307. When you come to write PHP code you will have to specify port 3307 on your database connection code to make the connection to MariaDB if you are going to run both at the same time.

或者,如果您只想使用 MariaDB,请关闭 MySQL,然后将 MariaDB 切换为使用端口 3306.有一些菜单项可以让您轻松找到它们.

Alternatively, if you want to use just MariaDB, Turn off MySQL and then switch MariaDB to use port 3306. There are menu items that make it quite easy if you look for them.

相关文章