我正在尝试通过此链接将 MYSQL 集成到 Windows 7 上的 ElasticSearch 中
我已完成以下步骤:
1:
在 C 目录下载 & 解压 https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.zip
2:
在 CMD 上运行此命令 ./bin/plugin --install jdbc --url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-river-jdbc/1.3.4.4/elasticsearch-river-jdbc -1.3.4.4-plugin.zip
3:
从 MYSQL 网站下载 MYSQL 连接器 mysql-connector-java-5.1.33.zip。
解压并复制 mysql-connector-java-5.1.33-bin.jar 文件。
将其放入 C:\elasticsearch-1.3.4\plugins\jdbc
我现在检查了 plugins 目录中有两个文件
elasticsearch-river-jdbc-1.3.4.4.jar
mysql-connector-java-5.1.33-bin
现在我试图在 CMD 上执行这个命令,我得到了错误
curl -XPUT 'localhost:9200/_river/jdbc-1.3.4.4-d2e33c3/_meta' -d '{
"type" : "jdbc",
"jdbc" : {
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"password" : "pass",
"sql" : "select * from abc"
}
}'
{
"error": "MapperParsingException[failed to parse]; nested: JsonParseException[Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@3cf756; line: 1, column:2]]; ",
"status": 400
}
curl: (6) Could not resolve host: type; Host not found
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: jdbc,jdbc; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (3) [globbing] unmatched brace at pos 5
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: jdbc:mysql:; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: root,password; No data record of requested typ
e
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: pass,sql; No data record of requested type
curl: (6) Could not resolve host: :; No data record of requested type
curl: (6) Could not resolve host: select * from abc; No data record of requested type
MYSQL(5.5.37) 数据库 (test) 只包含一个表 (abc) 有两列 id(pk) 和 address (varchar)
我使用这个jdbc-1.3.4.4-d2e33c3名称作为 jdbc 驱动程序。我从这个链接得到这个名字。
http://localhost:9200/_nodes?settings=true&pretty=true
我已经对其进行了搜索,但找不到与 mysql 集成相关的任何问题。
我的问题仍然缺少任何东西,或者我做错了设置。?