什么是 MySQL 服务器实例?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8003441/
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 21:33:12  来源:igfitidea点击:

What is a MySQL Server Instance?

mysqlsql-server

提问by Mike Chamberlain

I'm trying to understand what is meant by a Server Instance in MySQL. Googling for the term "MySQL Server Instance" reveals nothing, and the only reference I can find in the documentation refers to using the New Server Instance Wizard, but doesn't seem to explain why I'd ever want to use this.

我试图了解 MySQL 中的服务器实例是什么意思。在谷歌上搜索“MySQL 服务器实例”这个词并没有发现任何东西,我在文档中找到的唯一参考是使用新服务器实例向导,但似乎并没有解释为什么我想要使用它。

Coming from a Microsoft SQL Server background, a (named) instance is a completely separate and isolated installation of the server, running in its own process and on its own port. However, in MySQL a (server) instance seems to be a different beast, as for starters it seems to use the same port as my "existing" "instance".

来自 Microsoft SQL Server 背景,(命名)实例是服务器的完全独立和隔离的安装,在其自己的进程和自己的端口上运行。然而,在 MySQL 中,一个(服务器)实例似乎是一个不同的野兽,对于初学者来说,它似乎使用与我的“现有”“实例”相同的端口。

From the Home page of MySQL Workbench, I have the option on the right hand side to create a New Server Instance. What is a MySQL Server Instance, and why would I ever want to create a new one?

在 MySQL Workbench 的主页上,我可以选择在右侧创建一个新的服务器实例。什么是 MySQL 服务器实例,我为什么要创建一个新的实例?

采纳答案by wallyk

A server instance is a MySQL server running somewhere, and also how to connect to it. See the reference manual, which says:

服务器实例是在某处运行的 MySQL 服务器,以及如何连接到它。请参阅参考手册,其中说:

A server instance is created to provide a way of connecting to a server to be managed.

创建服务器实例以提供一种连接到要管理的服务器的方法。

Though it is somewhat circular, it makes sense from configuring the control manager's connection options where one can choose to connect to any number of MySQL servers, or connect to the same server in several different ways (like through a VPN or secondary network).

虽然它有点循环,但配置控制管理器的连接选项是有意义的,您可以选择连接到任意数量的 MySQL 服务器,或者以多种不同的方式(例如通过 VPN 或辅助网络)连接到同一台服务器。

回答by AaronLS

From this it appears each instance actually does have its own port judging from this guide to setting up an additional instance: http://www.ducea.com/2009/01/19/running-multiple-instances-of-mysql-on-the-same-machine/

由此看来,从本指南来看,每个实例实际上都有自己的端口来设置一个额外的实例:http: //www.ducea.com/2009/01/19/running-multiple-instances-of-mysql-on -同一台机器/

I'm not sure how this interacts in terms of named pipes on Windows though.

不过,我不确定这在 Windows 上的命名管道方面是如何交互的。