{"id":18044664,"url":"https://github.com/groonga/mysql2-replication","last_synced_at":"2025-04-05T03:26:50.274Z","repository":{"id":56885002,"uuid":"428540693","full_name":"groonga/mysql2-replication","owner":"groonga","description":"binlog extension for mysql2 gem","archived":false,"fork":false,"pushed_at":"2022-01-18T09:33:53.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-29T08:20:15.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/groonga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T06:20:10.000Z","updated_at":"2022-01-07T08:16:36.000Z","dependencies_parsed_at":"2022-08-20T14:31:15.918Z","dependency_job_id":null,"html_url":"https://github.com/groonga/mysql2-replication","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groonga%2Fmysql2-replication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groonga%2Fmysql2-replication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groonga%2Fmysql2-replication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groonga%2Fmysql2-replication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/groonga","download_url":"https://codeload.github.com/groonga/mysql2-replication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284816,"owners_count":20913687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T18:10:12.820Z","updated_at":"2025-04-05T03:26:50.256Z","avatar_url":"https://github.com/groonga.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql2-replication\n\n## Description\n\nmysql2-replication is an extension of [mysql2 gem](https://rubygems.org/gems/mysql2). It adds support for replication client feature based on `libmariadb.so` that is a MySQL/MariaDB client library provided by MariaDB.\n\n## Install\n\n```bash\ngem install mysql2-replication\n```\n\n## Usage\n\n```ruby\nrequire \"mysql2-replication\"\n\nclient = Mysql2::Client.new(username: \"root\",\n                            password: \"secret\")\n# Get the latest binlog file and position from source.\n# You can specify them manually.\nmaster_status = client.query(\"SHOW MASTER STATUS\").first\nfile = master_status[\"File\"]\nposition = master_status[\"Position\"]\n\nreplication_client = Mysql2Replication::Client(client)\nreplication_client.file_name = file\nreplication_client.start_position = position\nreplication_client.open do\n  replication_client.each do |event|\n    pp event\n  end\nend\n```\n\n## License\n\nThe MIT license. See `LICENSE.txt` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroonga%2Fmysql2-replication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroonga%2Fmysql2-replication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroonga%2Fmysql2-replication/lists"}