WAMP 服务器将 MySQL 切换到 MariaDB

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47813733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 22:51:37  来源:igfitidea点击:

WAMP server switch MySQL to MariaDB

mysqlwampmariadbwampserver

提问by kevas

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

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

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

我正在寻找它,但我找不到它。

enter image description here

在此处输入图片说明

回答by RiggsFolly

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

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

NOTE: Thats a bit memory hungry!

注意:这有点耗内存!

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 Choisedropdown under the Username and Password fields. In there you will see 2 options like below.

简单的测试看看 MySQL 和 MariaDB 是否都在运行。启动 phpMyAdmin 并查看登录屏幕。如果两者都在运行,您应该在用户名和密码字段下看到服务器选择下拉列表。在那里你会看到 2 个选项,如下所示。

enter image description here

在此处输入图片说明

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

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

enter image description here

在此处输入图片说明

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.

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

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

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

Small noteWAMPServer is now at V3.1.2, the update can be found hereThis 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.

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.

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.

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

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

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