简体   繁体   English

mysql集群.net连接器

[英]mysql cluster .net connector

I'm trying mysql cluster to use in a project for our customer. 我正在尝试为我们的客户在项目中使用mysql集群。

The configuration I setted up is the following: Hardware SO equipment 我设置的配置如下:硬件SO设备

Server1 - S.O. Windows 2008 R2 64bit 
Server2 - S.O. Windows 2008 R2 64bit 
Client1 - S.O. Windows 7 64bit 
Client2 - S.O. Windows 7 64bit 

UserClient2 - S.O. Windows 7 64bit 
UserClient3 - S.O. Windows 7 64bit 
UserClient4 - S.O. Windows 7 64bit 
UserClient5 - S.O. Windows 7 64bit 
UserClientXX - S.O. Windows 7 64bit (where XX is less than 15) 

My Sql Cluster Configuration Server1 - act as cluster data node 1 Server2 - act as cluster data node 2 Server1 - act as mysql node 1 (from now MYSQL-D1) Server2 - act as mysql node 2 (from now MYSQL-D2) My Sql群集配置Server1-充当群集数据节点1 Server2-充当群集数据节点2 Server1-充当mysql节点1(从现在开始MYSQL-D1)Server2-充当mysql节点2(从现在开始MYSQL-D2)

Client1 - act as mysql cluster management node 1 
Client2 - act as mysql cluster management node 2 

Client application configuration The following clients (from now CLIENTAPP): Client1, Client2, UserClient2, .., UserClientXX have a Microsoft .Net application that interact with mysql cluster database. 客户端应用程序配置下列客户端(从现在开始为CLIENTAPP):Client1,Client2,UserClient2,..,UserClientXX具有与mysql群集数据库交互的Microsoft .Net应用程序。

After a while the My sql cluster configuration appears to work correctly and any of CLIENTAPP it's able to connect to MYSQL-D1 or MYSQL-D2 (this is possibile by changing the connection string of .NET client application and pointing to IP of MYSQL-D1 or to the IP of MYSQL-D2). 一段时间后,我的sql群集配置似乎可以正常工作,并且任何CLIENTAPP都可以连接到MYSQL-D1或MYSQL-D2(这可以通过更改.NET客户端应用程序的连接字符串并指向MYSQL-D1的IP来实现。或MYSQL-D2的IP)。

In a perfect world CLIENTAPP automatically it's able to connect to the right server (MYSQL-D1 or MYSQL-D2), pratically: - if MYSQL-D1 it's down CLIENTAPP connect to MYSQL-D2 - if MYSQL-D2 it's down CLIENTAPP connect to MYSQL-D1 在理想情况下,CLIENTAPP能够自动连接到正确的服务器(MYSQL-D1或MYSQL-D2),实际上:-如果MYSQL-D1处于关闭状态,则CLIENTAPP连接到MYSQL-D2-如果MYSQL-D2处于关闭状态,则CLIENTAPP连接到MYSQL -D1

How .NET client application can interact with mysql cluster? .NET客户端应用程序如何与mysql群集进行交互?

The best solutions I have found for my scenario are the followings: 1. use mysql proxy but this is in a alpha stage and I can't use it in production enviroment 2. install cluster data node on each CLIENTAPP 3. use a connection string that support multiple servers (I don't know if it's supported by mysql .NET connector) 4. rewrite my application to interact with both MYSQL-DX node (what I want to avoid) 我为我的方案找到的最佳解决方案如下:1.使用mysql代理,但这处于Alpha阶段,我不能在生产环境中使用它。2.在每个CLIENTAPP上安装群集数据节点3.使用连接字符串支持多个服务器(我不知道mysql .NET连接器是否支持它)。4.重写我的应用程序以与两个MYSQL-DX节点进行交互(我要避免的是)

Is there a right solutions? 有正确的解决方案吗? Which one is the best one? 哪一个是最好的?

Thank you 谢谢

这在MySQL Cluster论坛上得到了解答: http : //forums.mysql.com/read.php?25,583508,584009

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM