Bug #69973 MYSQL replication stops working when using the connector

Submitted: 9 Aug 2013 15:31 Modified: 14 Jul 2016 12:54
Reporter: Rak Fal Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.7.4 OS:Windows (SBS 2003)
Assigned to: Assigned Account CPU Architecture:Any
Tags: connector, MySQL, replication

[9 Aug 2013 15:31] Rak Fal
Description:
I have setup MYSQL replication, Master-Slave, and this seems to be working fine. But, when I use the connector 6.7.4, no data is being replicated at all. This includes INSERTS/DELETES/UPDATES..etc. 

If I use the ODBC driver 5.1, this seems to be replicating data fine. I have also tested replication by using phpMyAdmin, and this seems to be fine too. 

How to repeat:
Setup MYSQL replication, and use the connectors to see if replication is occurring.
[9 Aug 2013 22:08] Fernando Gonzalez.Sanchez
Hi,

You need to configure Connector/NET load balancing/replication at the app.config/web.config level, for example:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="MySQL"	type="MySql.Data.MySqlClient.MySqlConfiguration,MySql.Data"/>
  </configSections>
  <MySQL>
    <Replication>
      <ServerGroups>
        <Group name="Group1" groupType="MySql.Data.MySqlClient.Replication.ReplicationRoundRobinServerGroup">
          <Servers>
            <Server name="master" IsMaster="true" connectionstring="server=localhost;port=3307;uid=root;password=;logging=true;"/>
            <Server name="slave1" IsMaster="false" connectionstring="server=localhost;port=3308;uid=lbuser;password=lbpass;logging=true;"/>
          </Servers>
        </Group>
      </ServerGroups>
    </Replication>
  </MySQL>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
  </startup>
</configuration>

The sample above assumes two severs, the master (read/write) in port 3307 and the slave (read only) in port 3308.

Then you open a connection referencing the Group1 only:
MySqlConnection conn = new MySqlConnection("server=Group1;")

And Connector/NET takes care of the rest.
[1 Jun 2016 10:47] Moshe Lampert
I am using this config file on the test. the problem is (in my system) pooling.
[1 Jun 2016 10:47] Moshe Lampert
ignore me. its not related to this bug.
[14 Jun 2016 12:54] Chiranjeevi Battula
Hello Rak Fal,

Thank you for your feedback.
Please try with below Configuring for MySQL replication using Connector/NET.
https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_replication_load

Thanks,
Chiranjeevi.
[15 Jul 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.