About this tool
Build MySQL connection strings in URI, Go DSN and JDBC forms with charset, time zone, TLS mode and connection limits.
This builder turns one set of MySQL connection details into three correctly formatted strings: a mysql:// URI (Node mysql2 / SQLAlchemy style), a Go DSN in go-sql-driver/mysql's user:pass@tcp(host:port)/db grammar, and a JDBC URL for Connector/J. Charset, IANA time zone, TLS mode, connect timeout and pool limit are mapped to each driver's own parameter names — including the ssl-mode → tls translation the Go driver needs. Everything is generated locally in the browser.
Open MySQL Connection String Builder on AltFTool — it loads instantly in your browser.
Paste your code or data sample into the workspace.
Pick the format, conversion, or analysis you need.
Copy the polished result straight back into your project.
URI, Go DSN and JDBC output simultaneously from the same inputs.
MySQL's DISABLED-to-VERIFY_IDENTITY modes are mapped to the Go driver's tls=false/preferred/skip-verify/true values.
Enter seconds once — emitted as milliseconds for mysql2 and Connector/J and as 10s duration syntax for Go.
The URI form is mysql://user:password@host:3306/database?charset=utf8mb4; the default port is 3306. Go's driver uses its own DSN grammar — user:password@tcp(host:3306)/database?parseTime=true — and Java uses jdbc:mysql://host:3306/database. All three carry options as query parameters, but the parameter names differ per driver.
It makes go-sql-driver/mysql scan DATE and DATETIME columns into Go time.Time values instead of []byte. Without it, reading a timestamp column into a time.Time fails, which is one of the most common first-run errors with the Go driver; loc= then controls which time zone those values are interpreted in.
For production over a network you do not fully trust, VERIFY_CA or VERIFY_IDENTITY — REQUIRED encrypts the connection but performs no certificate verification, so it does not stop man-in-the-middle attacks. The client default is PREFERRED, which falls back to plaintext if the server has no TLS configured.
Use utf8mb4. MySQL's legacy utf8 (utf8mb3) stores at most 3 bytes per character and cannot hold emoji or many CJK extension characters; utf8mb4 is full UTF-8 and has been the server default character set since MySQL 8.0.