
Product
Introducing Reachability for PHP
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.
github.com/rocketlaunchr/mysql-go
Advanced tools
This package will properly implement context cancelation for MySQL. Without this package, context cancelation does not actually cancel a MySQL query.
See Article for details of the behind-the-scenes magic.
The API is designed to resemble the standard library. It is fully compatible with the dbq package which allows for zero boilerplate database operations in Go.
⭐ the project to show your appreciation.
go get -u github.com/rocketlaunchr/mysql-go
import (
sql "github.com/rocketlaunchr/mysql-go"
)
pool, _ := sql.Open("user:password@tcp(localhost:3306)/db")
// Obtain an exclusive connection
conn, err := pool.Conn(ctx)
defer conn.Close() // Return the connection back to the pool
// Perform your read operation.
rows, err := conn.QueryContext(ctx, stmt)
if err != nil {
return err
}
// Obtain an exclusive connection
conn, err := pool.Conn(ctx)
defer conn.Close() // Return the connection back to the pool
// Perform the write operation
tx, err := conn.BeginTx(ctx, nil)
_, err = tx.ExecContext(ctx, stmt)
if err != nil {
return tx.Rollback()
}
tx.Commit()
Cancel the context. This will send a KILL signal to MySQL automatically.
It is highly recommended you set a KillerPool when you instantiate the DB object.
The KillerPool is used to call the KILL signal.
Checkout the proxy-protection branch if your database is behind a reverse proxy in order to better guarantee that you are killing the correct query.
The license is a modified MIT license. Refer to LICENSE file for more details.
© 2018-19 PJ Engineering and Business Solutions Pty. Ltd.
Feel free to enhance features by issuing pull-requests.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.