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.

DatabaseDriverURL format
PostgreSQLBundled with BroadSQLjdbc:postgresql://<host>:<port>/<database>
OracleVendor JAR in driversjdbc:oracle:thin:@//<host>:<port>/<service name>
SQL ServerVendor JAR in driversjdbc:sqlserver://<host>:<port>;databaseName=<database>
MySQL and MariaDBVendor JAR in driversjdbc:mysql://<host>:<port>/<database>
IBM Db2Vendor JAR in driversjdbc:db2://<host>:<port>/<database>
SQLiteBundled with BroadSQLjdbc:sqlite:<path to the database file>
H2Bundled with BroadSQLjdbc:h2:<path>/<database> or jdbc:h2:tcp://<host>/<path>/<database>
another JDBC databaseVendor JAR in driversthe URL format of the vendor's JDBC driver

The steps, for any database

  1. Add the driver (not needed for the five included ones): download the vendor's JDBC driver and copy its .jar file into the drivers folder of your BroadSQL installation. Restart BroadSQL.
  2. Check that it was found: SHOW DRIVERS; lists every JDBC driver of the drivers and lib folders, with its name, version and vendor. SHOW DRIVERS DETAILED; adds the JAR file and the driver class.
  3. 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.
  4. Test it without opening it: PING MYDB;.
  5. 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

ProblemCauseFix
(driver not found) next to the typeThe driver JAR is not in drivers or lib, or BroadSQL was not restartedCopy the JAR, restart, check with SHOW DRIVERS;
The connection test fails right after savingWrong URL, host, port, user or passwordEDIT CONNECTION MYDB; to correct it; a failed test does not undo the save
CONNECT refused because the connection opens the CDFThe URL points to BroadSQL's own configuration databaseDelete that connection: see The configuration database

More messages are in Troubleshooting.

Found something wrong or unclear on this page? , with the page address.