MySQL Connection String Builder
Generate, parse, and convert MySQL connection strings instantly. Everything runs in your browser.
MySQL Connection String Format
mysql://user:password@host:3306/dbname?ssl-mode=PREFERRED&charset=utf8mb4
Components
| Component | Description | Default |
|---|---|---|
user |
Database username | — |
password |
User's password | — |
host |
Server hostname | localhost |
3306 |
Port | 3306 |
dbname |
Database name | — |
ssl-mode |
SSL mode (DISABLED, PREFERRED, REQUIRED) | PREFERRED |
charset |
Character set | utf8mb4 |
Output Formats
MySQL CLI
mysql -h prod-server-1 -u admin -p'password' mydb --ssl-mode=REQUIREDJDBC
jdbc:mysql://prod-server-1:3306/mydb?user=admin&password=password&useSSL=true
Spring Boot
spring.datasource.url=jdbc:mysql://prod-server-1:3306/mydb?useSSL=true
spring.datasource.username=admin
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.cj.jdbc.DriverPrisma
DATABASE_URL="mysql://admin:password@prod-server-1:3306/mydb"How to Use
- Select MySQL as your provider
- Enter host, port, database name, and credentials
- Configure SSL mode and charset
- Choose your output format and copy the result