无法使用Entityframework连接到Mysql主/从
我有mysql主从配置,当我指定两个IP时,我无法连接到它。我搜索连接字符串并找到 所以它看起来很简单,但当我指定两个IP时,我得到一个错误“没有已知的主机” 我也发现并尝试了它,但奇怪的是,然后它慢了很多。所以现在我迷路了,我不能用我的复制品无法使用Entityframework连接到Mysql主/从,mysql,asp.net-mvc,entity-framework,azure,Mysql,Asp.net Mvc,Entity Framework,Azure,我有mysql主从配置,当我指定两个IP时,我无法连接到它。我搜索连接字符串并找到 所以它看起来很简单,但当我指定两个IP时,我得到一个错误“没有已知的主机” 我也发现并尝试了它,但奇怪的是,然后它慢了很多。所以现在我迷路了,我不能用我的复制品 另外,我不确定这是否有意义,但我正在Azure上运行,您应该在特定的配置部分指定服务器 <configSections> <section name="MySQL" type="MySql.Data.MySqlClient.M
另外,我不确定这是否有意义,但我正在Azure上运行,您应该在特定的配置部分指定服务器
<configSections>
<section name="MySQL" type="MySql.Data.MySqlClient.MySqlConfiguration, MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</configSections>
<MySQL>
<Replication>
<ServerGroups>
<Group name="MasterSlave">
<Servers>
<Server name="master" IsMaster="true" connectionstring=" server=<server>;port=<port>;uid=<user>;password=<password>;"/>
<Server name="slave" IsMaster="false" connectionstring=" server=<server>;port=<port>;uid=<user>;password=<password>;"/>
</Servers>
</Group>
</ServerGroups>
</Replication>
</MySQL>
来源:这是否适用于EntityFramework?也就是说,如果我使用这个连接字符串创建一个SQLConnection,我是否能够调用使用EF导入的存储过程?
<configSections>
<section name="MySQL" type="MySql.Data.MySqlClient.MySqlConfiguration, MySql.Data, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
</configSections>
<MySQL>
<Replication>
<ServerGroups>
<Group name="MasterSlave">
<Servers>
<Server name="master" IsMaster="true" connectionstring=" server=<server>;port=<port>;uid=<user>;password=<password>;"/>
<Server name="slave" IsMaster="false" connectionstring=" server=<server>;port=<port>;uid=<user>;password=<password>;"/>
</Servers>
</Group>
</ServerGroups>
</Replication>
</MySQL>
"server=MasterSlave;database=sakila;"