2017-04-15 79 views
1

我試圖運行Datomic臨用下面的命令:Datomic臨斌/運行沒有合適的驅動程序發現

./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" 

但每次我運行該命令它拋出:

Exception in thread "main" java.sql.SQLException: No suitable driver 

任何想法?

ps:我已經添加了mysql連接器jar到./lib。

回答

2

加布裏埃爾,

您需要提供數據庫名稱到對服務器的命令。您需要針對您的運行交易者啓動一個datomic peer並首先創建數據庫。對於這個例子,我創建了「測試」數據庫。

(require '[datomic.api :as d]) 
(def uri "datomic:sql://test?jdbc:mysql://localhost:3306/datomic?user=datomic&password=datomic") 
(d/create-database uri) 

創建數據庫應該返回true。一旦創建了URI字符串像:

./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" 

乾杯, Jaret