{"id":49921,"library":"go-sql-driver-mysql","title":"Go MySQL Driver","description":"Package mysql provides a MySQL driver for Go's database/sql package.","status":"active","version":"1.10.0","language":"go","source_language":null,"source_url":"https://github.com/go-sql-driver/mysql","tags":["mysql","database","sql","driver"],"install":[{"cmd":"go get github.com/go-sql-driver/mysql","lang":"bash","label":"Install github.com/go-sql-driver/mysql"}],"dependencies":[],"imports":[{"symbol":"mysql","correct":"github.com/go-sql-driver/mysql"}],"quickstart":{"code":"package main\n\nimport (\n\t\"database/sql\"\n\t_ \"github.com/go-sql-driver/mysql\"\n)\n\nfunc main() {\n\tdb, err := sql.Open(\"mysql\", \"user:password@tcp(127.0.0.1:3306)/dbname\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer db.Close()\n}","lang":"go","description":"Open a MySQL database connection using the driver."},"warnings":[{"fix":"Use `import _ \"github.com/go-sql-driver/mysql\"` to register the driver.","message":"The driver registers itself with database/sql on import, so you must use a blank import.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'databas':16 'database/sql':13 'driver':3,9,18 'go':1,11 'mysql':2,5,8,15 'packag':4,14 'provid':6 'sql':17","created_at":"2026-06-15T04:33:17.617831+00:00","updated_at":"2026-06-15T04:33:17.617831+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/go-sql-driver/mysql","github":"https://github.com/go-sql-driver/mysql","docs":"https://pkg.go.dev/github.com/go-sql-driver/mysql#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}