# Go-MySQL-Driver

> A pure Go MySQL driver for the database/sql package

Source: https://talira.ai/catalog/go-mysql-driver-ew83ck4j
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / drivers](https://talira.ai/categories/libraries/databases/drivers)
- Licence: MPL-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Go-MySQL-Driver Authors](https://talira.ai/orgs/go-mysql-driver-authors.md)

Go-MySQL-Driver is the MySQL driver most Go programs use with the standard library's database/sql package. It is written in pure Go with no C bindings, connects over TCP, Unix sockets or custom dialers, handles broken connections, and supports queries over 16 MB, LOAD DATA LOCAL INFILE with an allowlist, optional time.Time parsing and placeholder interpolation, and zlib or zstd compression. Its maintainers support [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md) 8.0+ and [MariaDB Server](https://talira.ai/catalog/mariadb-server-bxse0j6g.md) 10.11+ on the three latest Go releases. It is MPL-2.0.

## Links

- GitHub: https://github.com/go-sql-driver/mysql
- Docs: https://pkg.go.dev/github.com/go-sql-driver/mysql

## Problems it solves

- connect my Go service to a MySQL database
- use database/sql with MariaDB from Go without cgo
- parse MySQL DATETIME columns into time.Time in Go
- configure TLS and timeouts for a MySQL connection string in Go
- bulk load a CSV into MySQL from a Go program

## Features

- pure Go, no C bindings or cgo
- plugs into Go's database/sql with its connection pooling
- TCP, IPv6, Unix domain socket and custom dial connections
- automatic handling of broken connections
- queries larger than 16 MB and LONG DATA in prepared statements
- LOAD DATA LOCAL INFILE with file allowlisting and io.Reader support
- optional time.Time parsing and client-side placeholder interpolation
- zlib and optional zstd compression

## Trust

Overall: 0.68 out of 1.
Signals: maintenance 0.89, adoption 0.84, momentum 0.59, community 0.91, backing 0.30, extensibility 0.00.

- last commit 9 days ago
- 44 commits in the last 90 days
- latest release v1.10.2 12 days ago
- 15.3k GitHub stars
- 184 contributors
- backed by Go-MySQL-Driver Authors

## Related

- Works with [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md)
- Works with [MariaDB Server](https://talira.ai/catalog/mariadb-server-bxse0j6g.md)

## Alternatives

- [go-sqlite3](https://talira.ai/catalog/go-sqlite3-gkm992nx.md): A SQLite3 driver for Go using database/sql

## Sources

[^1]: https://github.com/go-sql-driver/mysql/blob/master/LICENSE (checked 26 Nov 2026)
