我正在尝试使用D2RQ (在Mac上)将MySQL数据库从MAMP转换为RDF图。我已经解压缩了d2rq服务器,并从终端运行了生成映射工具,如下所示:
sh generate-mapping -o mapping.ttl -u root -p passw jdbc:mysql://localhost/eurocup但是,它会给出一个错误,说明它无法连接到数据库:
Database connection to jdbc:mysql://localhost/eurocup failed (user: root): Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. (E54)有人能帮我解决这个问题吗?我对RDF和整个语义网非常陌生,甚至对命令行也是如此。建议另一种将SQL数据库(或转储)转换为RDF图的方法将受到欢迎!
发布于 2016-02-17 07:38:48
使用命令.在mysqldb中生成映射文件和RDF
脚本命令语法:
./generate-mapping -u userName -p Password -o /mapping file save path directory/fileName.ttl mysqldriver/databaseName示例:
./generate-mapping -u root -p root -o /home/bigtapp/Documents/d2rqgenerate_mapping/mapfile.ttl jdbc:mysql://localhost:3306/d2rq用户名密码:U根path:/home/tapp/Documents/d2rqgenerate_mapping/mapfile.ttl根-o文件保存-p sql驱动程序: jdbc:mysql://localhost:3306/d2rq此处d2rq :databasename
RDF创建命令:
dump-rdf -f RDF/XML -b localhost:3306 -o /home/tapp/Documents/d2rqgenerate_mapping/dumpfile.rdf /home/bigtapp/Documents/d2rqgenerate_mapping/mapfile.ttlhttps://stackoverflow.com/questions/19178188
复制相似问题