我正在尝试使用 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 图的方法!