# go-sql-driver/mysql

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/go-sql-driver-mysql).**

15,424 stars · 2,340 forks · Go · mpl-2.0

## Links

- GitHub: https://github.com/go-sql-driver/mysql
- Homepage: https://pkg.go.dev/github.com/go-sql-driver/mysql
- awesome-repositories: https://awesome-repositories.com/repository/go-sql-driver-mysql.md

## Topics

`database` `go` `mariadb` `mysql` `mysql-driver` `sql`

## Description

This project is a native Go driver for the MySQL protocol, providing a communication layer that enables applications to interact with relational database management systems. It implements the standard database interface, allowing developers to manage persistent connections, execute queries, and handle transactions within their applications.

The driver functions by translating high-level database commands into the specific binary packet format required for communication with MySQL servers. It manages network sessions through a connection pooling mechanism and supports context-aware query cancellation, which terminates long-running operations when a request is aborted or times out. To maintain performance during the retrieval of large result sets, the driver utilizes memory buffers to process incoming network streams.

The library is designed for integration with existing Go codebases that utilize the standard database package. It is available as a pluggable driver, facilitating structured data access and relational data persistence across backend services.

## Tags

### Data & Databases

- [MySQL Connectors](https://awesome-repositories.com/f/data-databases/database-connectivity/mysql-connectors.md) — Provides a native driver for the MySQL protocol enabling database connectivity and query execution.
- [Relational Database Connectors](https://awesome-repositories.com/f/data-databases/relational-database-connectors.md) — Manages persistent connections and data transmission between application code and database management systems.
- [SQL Database Connectors](https://awesome-repositories.com/f/data-databases/sql-database-connectors.md) — Implements the standard database interface to facilitate structured data access and interaction with relational databases.
- [Database Drivers](https://awesome-repositories.com/f/data-databases/database-drivers.md) — Implements low-level database communication protocols to allow applications to interact with database servers.
- [Relational Database Persistence](https://awesome-repositories.com/f/data-databases/relational-database-persistence.md) — Stores and retrieves application state in structured databases to ensure data integrity and reliable access.
- [Custom Driver Registration](https://awesome-repositories.com/f/data-databases/custom-driver-registration.md) — Registers as a pluggable driver using standard library interfaces for seamless integration with existing database code.
- [Binary Serialization Protocols](https://awesome-repositories.com/f/data-databases/data-serialization-formats/binary-serialization-protocols.md) — Translates high-level database commands into specific binary packet formats for efficient server communication.

### System Administration & Monitoring

- [Connection Pooling](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/connection-lifecycle-management/connection-pooling.md) — Maintains a cache of active network connections to reduce latency and overhead of establishing new sessions.

### Software Engineering & Architecture

- [Context-Aware Cancellation](https://awesome-repositories.com/f/software-engineering-architecture/rpc-cancellation/asynchronous-operation-cancellation/context-aware-cancellation.md) — Monitors lifecycle signals to terminate long-running network operations immediately when a request is aborted or times out.
