On this page
Connect to your database
BroadSQL reaches every database through its JDBC driver. Drivers for H2, PostgreSQL, Apache Derby, HSQLDB and SQLite are included; for another database, you add its vendor's driver JAR once. Then a connection is a name, a database type, a URL, a user and a password.
| Database | Driver | URL format |
|---|---|---|
| PostgreSQL | Bundled with BroadSQL | jdbc:postgresql://<host>:<port>/<database> |
| Oracle | Vendor JAR in drivers | jdbc:oracle:thin:@//<host>:<port>/<service name> |
| SQL Server | Vendor JAR in drivers | jdbc:sqlserver://<host>:<port>;databaseName=<database> |
| MySQL and MariaDB | Vendor JAR in drivers | jdbc:mysql://<host>:<port>/<database> |
| IBM Db2 | Vendor JAR in drivers | jdbc:db2://<host>:<port>/<database> |
| SQLite | Bundled with BroadSQL | jdbc:sqlite:<path to the database file> |
| H2 | Bundled with BroadSQL | jdbc:h2:<path>/<database> or jdbc:h2:tcp://<host>/<path>/<database> |
| another JDBC database | Vendor JAR in drivers | the URL format of the vendor's JDBC driver |
The steps, for any database
- Add the driver (not needed for the five included ones): download the vendor's JDBC driver and copy its
.jarfile into thedriversfolder of your BroadSQL installation. Restart BroadSQL. - Check that it was found:
SHOW DRIVERS;lists every JDBC driver of thedriversandlibfolders, with its name, version and vendor.SHOW DRIVERS DETAILED;adds the JAR file and the driver class. - Create the connection:
CONFIG;on Windows opens a window; on any platform,ADD CONNECTION MYDB;asks in turn for the Name, Type, URL, User Name, User Password, Database Group, Environment and Comment, then saves and tests it. The type gives the driver: choose the one named on the page of your database. - Test it without opening it:
PING MYDB;. - Open it:
CONNECT MYDB;. BroadSQL tests the connection first, so a wrong URL or password leaves you where you were, with the error.
A type whose driver is not found yet is still listed by CONFIG and ADD CONNECTION, with the note (driver not found); CONNECT then reports the missing driver class until the JAR is added and BroadSQL is restarted.
What each page gives you
- the driver to download, and the type to choose;
- the URL format, with an example, and the official page it comes from, with the date it was checked;
- the options people usually need (encryption, service names, instances);
- what works differently on that database;
- whether the URL example was verified with BroadSQL itself. A format taken from vendor documentation and a connection verified by the BroadSQL team are two different things, and each page says which one applies.
When it fails
| Problem | Cause | Fix |
|---|---|---|
(driver not found) next to the type | The driver JAR is not in drivers or lib, or BroadSQL was not restarted | Copy the JAR, restart, check with SHOW DRIVERS; |
| The connection test fails right after saving | Wrong URL, host, port, user or password | EDIT CONNECTION MYDB; to correct it; a failed test does not undo the save |
CONNECT refused because the connection opens the CDF | The URL points to BroadSQL's own configuration database | Delete that connection: see The configuration database |
More messages are in Troubleshooting.
Related
- Technical requirements: bundled driver versions, behavior that differs by type.
- Connections, Database Groups and Environments: organize the connections you add.
- Security: how connection passwords are stored.
Found something wrong or unclear on this page? Tell us, with the page address.