# go-sql-driver/mysql

Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package

Repository: https://github.com/go-sql-driver/mysql
Canonical: https://ross.abutalabs.com/products/go-sql-driver-mysql
Homepage: https://pkg.go.dev/github.com/go-sql-driver/mysql
Language: Go
License: MPL-2.0
License Family: copyleft
Topics: go, mysql, sql, database, mysql-driver, mariadb
Last push: 2026-08-20T21:34:52+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 69, longevity 100
- inputs: {"age_days": 5015, "days_push": 13, "days_rel": 126, "gap_med": 48.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15273, forks 2333 (observed 2026-08-28T04:11:09.482400+00:00)

## What it is
Go-MySQL-Driver is a lightweight, pure-Go MySQL driver for Go's database/sql package, also compatible with MariaDB. It supports TCP/IPv4, TCP/IPv6, and Unix domain sockets with connection pooling, context support, and prepared statements.

## Use cases
- connect to mysql from a go application
- query mariadb database in golang
- go database/sql driver for mysql
- run prepared statements against mysql in go
- connect to mysql over unix socket in go
- handle large mysql queries in go

## When to choose
- you need a mature, widely-adopted MySQL driver for Go's database/sql
- you want a pure-Go implementation with no C bindings
- you need MariaDB compatibility or flexible connection protocols

## When to avoid
- you use a different language than Go
- you need an ORM with query building rather than a raw driver
- you connect to a non-MySQL database like PostgreSQL

## Facets
- artifact type: library
- maturity: stable
- function: database-driver, database
- domain: databases, backend, developer-tools
- platform: go, cross-platform
- tags: mysql, mariadb, sql, database-sql, pure-go

## Member repositories
- go-sql-driver/mysql (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:09.482400+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:06:31.683789+00:00, confidence not recorded.
  - readme: https://github.com/go-sql-driver/mysql (fetched 2026-08-28T04:11:09.482400+00:00, sha 3b7bf5910170)
  - homepage: https://pkg.go.dev/github.com/go-sql-driver/mysql (fetched 2026-08-29T08:04:20.253951+00:00, sha 72cf5fb4aa5e)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T08:04:20.264481+00:00, sha 757852027879)
  - site_page: https://go.dev/about (fetched 2026-08-29T08:04:20.266786+00:00, sha 8b6453863a90)
  - site_page: https://go.dev/project (fetched 2026-08-29T08:04:20.268499+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
