{"id":36419785,"url":"https://github.com/asyncer-io/r2dbc-mysql","last_synced_at":"2026-01-11T17:05:22.832Z","repository":{"id":139685103,"uuid":"612503164","full_name":"asyncer-io/r2dbc-mysql","owner":"asyncer-io","description":"Reactive Relational Database Connectivity for MySQL. The official successor to mirromutth/r2dbc-mysql(dev.miku:r2dbc-mysql).","archived":false,"fork":false,"pushed_at":"2025-11-08T17:59:54.000Z","size":3050,"stargazers_count":265,"open_issues_count":16,"forks_count":26,"subscribers_count":5,"default_branch":"trunk","last_synced_at":"2025-11-08T19:21:53.916Z","etag":null,"topics":["database","event-driven","java","mysql","mysql-client","mysql-connector","mysql-driver","r2dbc","r2dbc-mysql","reactive","reactive-programming","reactive-stream","reactive-streams"],"latest_commit_sha":null,"homepage":"https://r2dbc.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asyncer-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-11T06:09:27.000Z","updated_at":"2025-11-08T17:59:59.000Z","dependencies_parsed_at":"2023-12-20T18:25:11.787Z","dependency_job_id":"c36bf04a-0c28-4262-8d4b-32d0c7a99901","html_url":"https://github.com/asyncer-io/r2dbc-mysql","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/asyncer-io/r2dbc-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncer-io%2Fr2dbc-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncer-io%2Fr2dbc-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncer-io%2Fr2dbc-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncer-io%2Fr2dbc-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asyncer-io","download_url":"https://codeload.github.com/asyncer-io/r2dbc-mysql/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncer-io%2Fr2dbc-mysql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","event-driven","java","mysql","mysql-client","mysql-connector","mysql-driver","r2dbc","r2dbc-mysql","reactive","reactive-programming","reactive-stream","reactive-streams"],"created_at":"2026-01-11T17:05:22.750Z","updated_at":"2026-01-11T17:05:22.819Z","avatar_url":"https://github.com/asyncer-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reactive Relational Database Connectivity MySQL Implementation\n\n![Maven Central](https://img.shields.io/maven-central/v/io.asyncer/r2dbc-mysql?color=blue)\n![LICENSE](https://img.shields.io/github/license/asyncer-io/r2dbc-mysql)\n\nThis project contains the [MySQL][m] implementation of the [R2DBC SPI](https://github.com/r2dbc/r2dbc-spi).\nThis implementation is not intended to be used directly, but rather to be\nused as the backing implementation for a humane client library to\ndelegate to. See [R2DBC Homepage](https://r2dbc.io).\n\nSee [R2DBC MySQL wiki](https://github.com/asyncer-io/r2dbc-mysql/wiki) for more information.\n\n## Spring-framework and R2DBC-SPI Compatibility\n\nRefer to the table below to determine the appropriate version of r2dbc-mysql for your project.\n\n| spring-boot-starter-data-r2dbc | spring-data-r2dbc | r2dbc-spi     | r2dbc-mysql(recommended)     |\n|--------------------------------|-------------------|---------------|------------------------------|\n| 3.0.* and above                | 3.0.* and above   | 1.0.0.RELEASE | io.asyncer:r2dbc-mysql:1.4.0 |\n| 2.7.*                          | 1.5.*             | 0.9.1.RELEASE | io.asyncer:r2dbc-mysql:0.9.7 |\n| 2.6.* and below                | 1.4.* and below   | 0.8.6.RELEASE | dev.miku:r2dbc-mysql:0.8.2   |\n\n## Supported Features\n\nThis driver provides the following features:\n\n- [x] Unix domain socket.\n- [x] Compression protocols, including zstd and zlib.\n- [x] Execution of simple or batch statements without bindings.\n- [x] Execution of prepared statements with bindings.\n- [x] Reactive LOB types (e.g. BLOB, CLOB)\n- [x] All charsets from MySQL, like `utf8mb4_0900_ai_ci`, `latin1_general_ci`, `utf32_unicode_520_ci`, etc.\n- [x] All authentication types for MySQL, like `caching_sha2_password`, `mysql_native_password`, etc.\n- [x] General exceptions with error code and standard SQL state mappings.\n- [x] Secure connection with verification (SSL/TLS), auto-select TLS version for community and enterprise editions.\n- [x] SSL tunnel for proxy protocol of MySQL.\n- [x] Transactions with savepoint.\n- [x] Native ping can be sent via `Connection.validate(ValidationDepth.REMOTE)` and the lightweight ping syntax `/* ping */ ...`.\n- [x] Extensible, e.g. extend built-in `Codec`(s).\n- [x] MariaDB `RETURNING` clause.\n\n## Version compatibility / Integration tests states\n\n![MySQL 5.5 status](https://img.shields.io/badge/MySQL%205.5-pass-blue)\n![MySQL 5.6 status](https://img.shields.io/badge/MySQL%205.6-pass-blue)\n![MySQL 5.7 status](https://img.shields.io/badge/MySQL%205.7-pass-blue)\n![MySQL 8.0 status](https://img.shields.io/badge/MySQL%208.0-pass-blue)\n![MySQL 8.1 status](https://img.shields.io/badge/MySQL%208.1-pass-blue)\n![MySQL 8.2 status](https://img.shields.io/badge/MySQL%208.2-pass-blue)\n![MySQL 8.3 status](https://img.shields.io/badge/MySQL%208.3-pass-blue)\n![MySQL 8.4 status](https://img.shields.io/badge/MySQL%208.4-pass-blue)\n![MySQL 9.0 status](https://img.shields.io/badge/MySQL%209.0-pass-blue)\n![MariaDB 10.6 status](https://img.shields.io/badge/MariaDB%2010.6-pass-blue)\n![MariaDB 10.11 status](https://img.shields.io/badge/MariaDB%2010.11-pass-blue)\n\nIn fact, it supports lower versions, in the theory, such as 4.1, 4.0, etc.\n\nHowever, Docker-certified images do not have these versions lower than 5.5.0, so tests are not integrated on these versions.\n\n## Maven\n\n```xml\n\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.asyncer\u003c/groupId\u003e\n  \u003cartifactId\u003er2dbc-mysql\u003c/artifactId\u003e\n  \u003cversion\u003e1.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Gradle\n\n### Groovy DSL\n\n```groovy\ndependencies {\n    implementation 'io.asyncer:r2dbc-mysql:1.4.0'\n}\n```\n\n### Kotlin DSL\n\n```kotlin\ndependencies {\n    // Maybe should to use `compile` instead of `implementation` on the lower version of Gradle.\n    implementation(\"io.asyncer:r2dbc-mysql:1.4.0\")\n}\n```\n\n## Getting Started\n\nHere is a quick teaser of how to use R2DBC MySQL in Java:\n\n```java\n// Notice: the query string must be URL encoded\nConnectionFactory connectionFactory = ConnectionFactories.get(\"r2dbcs:mysql://root:database-password-in-here@127.0.0.1:3306/r2dbc\");\n\n// Creating a Mono using Project Reactor\nMono\u003cConnection\u003e connectionMono = Mono.from(connectionFactory.create());\n```\n\nSee [Getting Started](https://github.com/asyncer-io/r2dbc-mysql/wiki/getting-started) and [Configuration Options](https://github.com/asyncer-io/r2dbc-mysql/wiki/Configuration-Options) wiki for more information.\n\n### Pooling\n\nSee [r2dbc-pool](https://github.com/r2dbc/r2dbc-pool).\n\n### Usage\n\n```java\nconnection.createStatement(\"INSERT INTO `person` (`first_name`, `last_name`) VALUES ('who', 'how')\")\n    .execute(); // return a Publisher include one Result\n```\n\nSee [Usage](https://github.com/asyncer-io/r2dbc-mysql/wiki/usage) wiki for more information.\n\n## Reporting Issues\n\nThe R2DBC MySQL Implementation uses GitHub as issue tracking system to record bugs and feature requests.\nIf you want to raise an issue, please follow the recommendations below:\n\n- Before log a bug, please search the [issue tracker](https://github.com/asyncer-io/r2dbc-mysql/issues) to see if someone has already reported the problem.\n- If the issue doesn't already exist, [create a new issue](https://github.com/asyncer-io/r2dbc-mysql/issues/new).\n- Please provide as much information as possible with the issue report, we like to know the version of R2DBC MySQL that you are using and JVM version.\n- If you need to paste code, or include a stack trace use Markdown **\u0026#96;\u0026#96;\u0026#96;** escapes before and after your text.\n- If possible try to create a test-case or project that replicates the issue. Attach a link to your code or a compressed file containing your code.\n\n## Before use\n\n- The MySQL data fields encoded by index-based natively, get fields by an index will have **better** performance than get by column name.\n- Each `Result` should be used (call `getRowsUpdated` or `map`/`flatMap`, even table definition), can **NOT** just ignore any `Result`, otherwise inbound stream is unable to align. (like `ResultSet.close` in jdbc, `Result` auto-close after used by once)\n- The MySQL server does not **actively** return time zone when query `DATETIME` or `TIMESTAMP`, this driver does not attempt time zone conversion. That means should always use `LocalDateTime` for SQL type `DATETIME` or `TIMESTAMP`. Execute `SHOW VARIABLES LIKE '%time_zone%'` to get more information.\n- Should not turn-on the `trace` log level unless debugging. Otherwise, the security information may be exposed through `ByteBuf` dump.\n- If `Statement` bound `returnGeneratedValues`, the `Result` of the `Statement` can be called both of `getRowsUpdated` and `map`/`flatMap`.\n  - If server is MariaDB 10.5.1 and above: the statement will attempt to use `RETURNING` clause, zero arguments will make the statement like `... RETURNING *`.\n  - Otherwise: `returnGeneratedValues` can only be called with one or zero arguments, and `map`/`flatMap` will emit the last inserted id.\n- The MySQL may be not support well for searching rows by a binary field, like `BIT` and `JSON`\n  - `BIT`: cannot select 'BIT(64)' with value greater than 'Long.MAX_VALUE' (or equivalent in binary)\n  - `JSON`: different MySQL may have different serialization formats, e.g. MariaDB and MySQL\n- MySQL 8.0+ disables `@@global.local_infile` by default, make sure `@@local_infile` is `ON` before enable `allowLoadLocalInfileInPath` of the driver. e.g. run `SET GLOBAL local_infile=ON`, or set it in `mysql.cnf`.\n\n## License\n\nThis project is released under version 2.0 of the [Apache License](https://www.apache.org/licenses/LICENSE-2.0).\n\n# Acknowledgements\n\n## Contributors\n\n\u003ca href=\"https://github.com/asyncer-io/r2dbc-mysql/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=asyncer-io/r2dbc-mysql\" /\u003e\n\u003c/a\u003e\n\nThanks a lot for your support!\n\n## Supports\n\n- [R2DBC Team](https://r2dbc.io) - Thanks for their support by sharing all relevant resources around R2DBC\n  projects.\n\n[m]: https://www.mysql.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyncer-io%2Fr2dbc-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasyncer-io%2Fr2dbc-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyncer-io%2Fr2dbc-mysql/lists"}