elasticsearch-jdbc icon indicating copy to clipboard operation
elasticsearch-jdbc copied to clipboard

Help!Connecting to mysql on windows

Open sz-sunset opened this issue 8 years ago • 2 comments

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.

sz-sunset avatar Sep 20 '16 02:09 sz-sunset

Problem has been solved Reference resources http://xlixli.net/?p=506

This is my local JDK environment variable problem

sz-sunset avatar Sep 20 '16 03:09 sz-sunset

my email [email protected]

sz-sunset avatar Sep 20 '16 03:09 sz-sunset