mysql

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

24 articles 15.4k View on GitHub ↗
24 articles
Go MySQL Driver Error Handling Strategy for Network Failures: When and How ErrBadConn Is Returned

Learn how go-sql-driver/mysql handles network failures with ErrBadConn. Discover when this error is returned and how it ensures connection pool reliability for your Go applications.

internals
Mar 2, 2026
How go-sql-driver/mysql Implements driver.Validator and driver.SessionResetter

Discover how go-sql-driver/mysql implements driver.Validator and driver.SessionResetter for atomic closed flags, buffer status checks, and optional TCP liveness tests for efficient connection pooling.

internals
Mar 2, 2026
The Interaction Between `allowFallbackToPlaintext` and `tls=preferred` in go-sql-driver/mysql

Understand how allowFallbackToPlaintext interacts with tls=preferred in go-sql-driver/mysql. Learn about automatic plaintext fallbacks when TLS is not supported.

internals
Mar 2, 2026
How go-sql-driver/mysql Manages Connection Timeout, readTimeout, and writeTimeout Settings

Learn how go-sql-driver/mysql manages connection timeout, readTimeout, and writeTimeout. Understand context deadlines and per-operation socket settings for robust MySQL connections.

internals
Mar 2, 2026
When to Use the `timeTruncate` DSN Parameter in go-sql-driver/mysql

Learn when to use the timeTruncate DSN parameter in go-sql-driver/mysql. Prevent precision mismatches by rounding down time values before sending them to MySQL.

how-to-guide
Mar 2, 2026
BeforeConnect Callback in go-sql-driver/mysql: Use Cases and Implementation

Explore BeforeConnect callback use cases in go-sql-driver/mysql. Dynamically select databases, inject credentials, and configure session variables before establishing a MySQL connection.

use-cases
Mar 2, 2026
MySQL Driver parseTime=false Behavior for DATE and DATETIME Columns

Explore go-sql-driver/mysql parseTime=false behavior. Learn how DATE and DATETIME columns return as raw byte slices, preserving MySQL wire format for your application.

internals
Mar 2, 2026
How `serverPubKey` Eliminates MITM Vulnerabilities in MySQL RSA Authentication

Learn how go-sql-driver/mysql serverPubKey parameter prevents MITM attacks by using a pre-registered RSA public key for secure password encryption.

security-best-practices
Mar 2, 2026
Charset vs Collation DSN Parameters in go-sql-driver/mysql: Impact Explained

Understand the Charset vs Collation DSN parameters in go-sql-driver/mysql. Learn how character encoding and sorting rules impact your MySQL connections.

deep-dive
Mar 2, 2026
How the Go MySQL Driver Returns and Handles Multiple Result Sets from Multi-Statement Executions

Learn how the go-sql-driver/mysql returns multiple result sets from multi-statement executions. Discover efficient handling with HasNextResultSet and NextResultSet.

internals
Mar 2, 2026
How to Use MySQL connectionAttributes in Go: Complete Implementation Guide

Learn how to use MySQL connectionAttributes in Go with a complete implementation guide. Understand how this driver feature enables custom context and metadata reporting.

how-to-guide
Mar 2, 2026
How go-sql-driver/mysql Secures LOAD DATA LOCAL INFILE Requests

Secure your LOAD DATA LOCAL INFILE requests with go-sql-driver/mysql. Discover its deny-by-default policy, explicit file registration, and secure reader abstractions.

security
Mar 2, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →