elasticsearch-jdbc
elasticsearch-jdbc copied to clipboard
Help!Connecting to mysql on windows
My code in mysql-myself-test.bat looks like: @echo off
set LIB="E:\elasticsearch-jdbc-2.3.4.0\lib*"
set BIN="E:\elasticsearch-jdbc-2.3.4.0\bin"
REM ???
echo {^
"type" : "jdbc",^
"jdbc" : {^
"url" : "jdbc:mysql://localhost:3306/test",^
"user" : "xxx",^
"password" : "xxx",^
"schedule": "0 0-59 0-23 ? * *",^
"sql" : "select *, dataId as _id from datatest",^
"treat_binary_as_string" : true,^
"elasticsearch" : {^
"cluster" : "elasticsearch",^
"host" : "localhost",^
"port" : 9300^
},^
"index" : "test3",^
"type" : "artist"^
}^
}^ | "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"
error:
E:\elasticsearch-jdbc-2.3.4.0\bin>mysql-myself-test.bat { "type" : "jdbc", "jdbc" : { "url" : "jdbc:mysql://localhost:3306/tes sword" : "xxx", "schedule": "0 0-59 0-23 ? * *", "sql" : "select *, dataId as _i ing" : true, "elasticsearch" : { "cluster" : "elasticsearch", "port" : 9300 }, "index" : "test3", "type" : "artist" '}' is not recognized as an internal or external command, operable program or batch file.
Problem has been solved Reference resources http://xlixli.net/?p=506
This is my local JDK environment variable problem
my email [email protected]