cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Can i connect mysql database which is present on another server

Hi,
I had a doubt that while using apoc.load.jdbc....can i specify any other server ip other than that on which neo4j is running currently.
ex.
neo4j is running on 192.168.XXX.XXX
but the mysql database is present at :192.168.YYY.YYY

can i use 192.168.YYY.YYY instead of localhost in the below example
CALL apoc.load.jdbc('jdbc:mysql://localhost:3306/proddb1?user=root&password=football','select title from movies where studio='MGM Studios'') YIELD row

1 ACCEPTED SOLUTION

URL encoding of the password value.

For example the character ^ becomes %5E when you do url encode.

So instead of Pa^^word give Pa%5E%5Eword as the password value and try.

View solution in original post

8 REPLIES 8

anthapu
Graph Fellow

you should be able to use another machine IP address in apoc jdbc url.

Thanks for the heads up..

Actually now the problem is .......I have '^' character in my password so its showing illegal use of character in query.

how can I escape this ^

Just a wild guess from me:
Please try backtick key to store password. eg Pa^^word
2X_9_9598a0622d2b03404952ebecca33d3e6d3c56fad.png

Thanks but i had tried it already.......that doesn't work either.
Backtick itself becomes a illegal character

Since it is part of URL try url encoded value for it and see if it works.

Actually i didn't get what u said,
did u mean to pass the password as parameter
can u please explain?
Thanks in advance

URL encoding of the password value.

For example the character ^ becomes %5E when you do url encode.

So instead of Pa^^word give Pa%5E%5Eword as the password value and try.

Hey anthapu,
Thank u very much for your help......!!!
It worked fine for me...!