Reputation: 189
I'm trying to run Datomic Pro with the following command:
./bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d demo,"datomic:sql://jdbc:mysql://localhost:3306/datomic?user=datomic&password=datomic"
But every time I run that command it throws:
Exception in thread "main" java.sql.SQLException: No suitable driver
Any thoughts?
ps: I've already added mysql connector jar to ./lib.
Upvotes: 1
Views: 431
Reputation: 136
Gabriel,
You need to provide a database name to the peer-server command. You'll want to start a datomic peer against your running transactor and create the database first. For this example I created the "test" db.
(require '[datomic.api :as d])
(def uri "datomic:sql://test?jdbc:mysql://localhost:3306/datomic?user=datomic&password=datomic")
(d/create-database uri)
That create DB should return true. Once created your URI string will look like:
./bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d demo,"datomic:sql://test?jdbc:mysql://localhost:3306/datomic?user=datomic&password=datomic"
Cheers, Jaret
Upvotes: 2