# Cannot connect

**URL:** <https://community.neo4j.com/t/cannot-connect/36546>\
**Category:** R\
**Created:** [April 8, 2021, 4:36pm UTC](https://community.neo4j.com/t/cannot-connect/36546 "2021-04-08T16:36:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhall54](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dhall54/32/4568_2.png) [@dhall54](https://community.neo4j.com/u/dhall54)\
**Post date:** [April 8, 2021, 4:36pm UTC](https://community.neo4j.com/t/cannot-connect/36546/1 "2021-04-08T16:36:57Z")

</div>

Hello! I am trying to understand Neo4J Version 4.2.1 and how it is used in R. I am using the localhost:7474 as my url with the Neo4R package in R. However whenever I navigate to that website to find out my username and password, the link is broken. I tried logging into Sandbox with some other projects to see the connection details and tried adding those credentials but it did not work.

con \<- neo4j\_api$new(  
url = "[http://localhost:7474](http://localhost:7474)",  
user = "neo4j",  
password = "password"  
)

When I try to use the default password and username, I get the following error after using the command con$ping...

con$ping  
Error: Failed to connect to localhost port 7474: Connection refused

---

<div class="post-metadata">

**Author:** ![florent\_biville](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/florent_biville/32/14205_2.png) [@florent\_biville](https://community.neo4j.com/u/florent_biville)\
**Post date:** [April 9, 2021, 8:45am UTC](https://community.neo4j.com/t/cannot-connect/36546/2 "2021-04-09T08:45:28Z")

</div>

I might be missing something here, but you mentioned only sandbox, so `localhost:7474` is not going to work.  
Are you running a Neo4j server locally on your machine?

---

<div class="post-metadata">

**Author:** ![dhall54](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dhall54/32/4568_2.png) [@dhall54](https://community.neo4j.com/u/dhall54)\
**Post date:** [April 9, 2021, 2:06pm UTC](https://community.neo4j.com/t/cannot-connect/36546/3 "2021-04-09T14:06:51Z")

</div>

From my understanding, I need a version of Neo4J that is 3.5.x. However, I am having problems finding a version on the website

---

<div class="post-metadata">

**Author:** ![florent\_biville](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/florent_biville/32/14205_2.png) [@florent\_biville](https://community.neo4j.com/u/florent_biville)\
**Post date:** [April 9, 2021, 4:30pm UTC](https://community.neo4j.com/t/cannot-connect/36546/4 "2021-04-09T16:30:31Z")

</div>

You can use a 3.5 Docker image if you want to try it out: [Docker](https://hub.docker.com/_/neo4j/)

---

<div class="post-metadata">

**Author:** ![dhall54](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dhall54/32/4568_2.png) [@dhall54](https://community.neo4j.com/u/dhall54)\
**Post date:** [April 9, 2021, 4:32pm UTC](https://community.neo4j.com/t/cannot-connect/36546/5 "2021-04-09T16:32:15Z")

</div>

I found out how to change the version to 3.5.x. However, I am experiencing problems with the password.

---

<div class="post-metadata">

**Author:** ![dan.flavin](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dan.flavin/32/4441_2.png) [@dan.flavin](https://community.neo4j.com/u/dan.flavin)\
**Post date:** [April 13, 2021, 1:27am UTC](https://community.neo4j.com/t/cannot-connect/36546/6 "2021-04-13T01:27:52Z")

</div>

You might want to try this [R project / CRAN package](https://github.com/keithmcnulty/neo4jshell) to connect to Neo4j from R. It uses the Neo4j cypher-shell command line tool to send queries and retrieve data from the graph which makes it fairly lightweight implementation.
