This is what I have tried, starting with clojure.java.jdbc and a map containing the database connection details:
(:require '[clojure.java.jdbc :as j]))
(def mysql-db {:dbtype "mysql", :dbname "changelog_development", :user "root", :password "", :useSSL true, :verifyServerCertificate false}
First I tried to use execute but it cannot use the given connection configuration because the database does not yet exist:
(j/execute! mysql-db "CREATE DATABASE changelog_development") ;; MySQLSyntaxErrorException Unknown database 'changelog_development'
So I remove that dbname key and tried again, however the error says I have a missing parameter:
(j/execute! (dissoc mysql-db :dbname) "CREATE DATABASE changelog_development") ;; IllegalArgumentException db-spec {:dbtype "mysql", :user "root", :password "", :useSSL true, :verifyServerCertificate false} is missing a required parameter