Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SciSharp/dotnet-mysql-replication
C# Implementation of MySQL replication client
https://github.com/SciSharp/dotnet-mysql-replication
client csharp mysql replication
Last synced: about 2 months ago
JSON representation
C# Implementation of MySQL replication client
- Host: GitHub
- URL: https://github.com/SciSharp/dotnet-mysql-replication
- Owner: SciSharp
- License: apache-2.0
- Created: 2019-09-24T10:08:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-25T22:40:41.000Z (7 months ago)
- Last Synced: 2024-07-31T09:09:06.386Z (5 months ago)
- Topics: client, csharp, mysql, replication
- Language: C#
- Homepage:
- Size: 159 KB
- Stars: 49
- Watchers: 14
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - SciSharp/dotnet-mysql-replication - C# Implementation of MySQL replication client (C\#)
README
# dotnet-mysql-replication
[![build](https://github.com/SciSharp/dotnet-mysql-replication/actions/workflows/build.yaml/badge.svg)](https://github.com/SciSharp/dotnet-mysql-replication/actions/workflows/build.yaml)
[![MyGet Version](https://img.shields.io/myget/scisharp/vpre/SciSharp.MySQL.Replication)](https://www.myget.org/feed/scisharp/package/nuget/SciSharp.MySQL.Replication)
[![NuGet Version](https://img.shields.io/nuget/v/SciSharp.MySQL.Replication.svg?style=flat)](https://www.nuget.org/packages/SciSharp.MySQL.Replication/)dotnet-mysql-replication is a C# Implementation of MySQL replication protocol client. This allows you to receive events like insert, update, delete with their data and raw SQL queries from MySQL.
## Usage
```csharp
using SciSharp.MySQL.Replication;
var serverHost = "localhost";
var username = "root";
var password = "scisharp";
var serverId = 1; // replication server idvar client = new ReplicationClient();
var result = await client.ConnectAsync(serverHost, username, password, serverId);if (!result.Result)
{
Console.WriteLine($"Failed to connect: {result.Message}.");
return;
}client.PackageHandler += (s, p) =>
{
Console.WriteLine(p.ToString());
Console.WriteLine();
}client.StartReceive();
//...
await client.CloseAsync();
```