DatabaseDriverdb = newMariaDBDatabaseDriver(
"localhost",
"username",
"password",
"database name", // (optional) “Database” on the server to use initially3306, // (optional) MariaDB server port
);
db.connect(); // establish database connectionscope(exit) db.close(); // scope guard, to close the database connection when exiting the current scope
If you don’t specify an inital database during the connection setup,
you’ll usually want to manually select one by executing a USE databaseName; statement.
MariaDB Database Driver
Supposed to be MySQL compatible, as well.