{"__v":0,"_id":"587686268002d40f00382e88","category":{"__v":0,"_id":"58767da4d89ef20f003b6f1e","project":"566c97797831040d003eb3bc","version":"566c97797831040d003eb3bf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-01-11T18:47:00.124Z","from_sync":false,"order":2,"slug":"connecting-to-your-database","title":"Connecting"},"parentDoc":null,"project":"566c97797831040d003eb3bc","user":"57167c775d90dc170060ef97","version":{"__v":10,"_id":"566c97797831040d003eb3bf","project":"566c97797831040d003eb3bc","createdAt":"2015-12-12T21:54:01.970Z","releaseDate":"2015-12-12T21:54:01.970Z","categories":["566c977a7831040d003eb3c0","5716338cb5af590e00a0ff1d","57163947893cbe0e002d75fc","57163f41b5af590e00a0ff35","57cd74d2873de50e00724a2f","57cd7de8baaee30e0093ecc3","57d6ada046dcc30e007dd15e","57fdc2b31646dc0e0010480a","57fdd8b86c9d141900d87bf1","58767da4d89ef20f003b6f1e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-11T19:23:18.899Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"There are a couple of different ways you can connect to your database. This article will cover how to connect using the Neo4j REST API or the new Bolt binary protocol. Which method you select will depend on your use case.\n\nIf you want to develop an application there is a wide range of drivers you can use, some of them officially provided by Neo Technology, while others are developed by the community. Please take a look at our driver’s section to gain insight into your alternatives.\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Database credentials should never be published on the internet for security reasons. If you have exposed them, please contact with GrapheneDB support team and we will reset them for you.\",\n  \"title\": \"Keep in mind:\"\n}\n[/block]\nLet’s take a look at the two options Neo4j provides:\n\n* [Neo4j REST API](#using-neo4j-rest-api)\n* [New Bolt binary protocol](#using-new-bolt-binary-protocol)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using Neo4j REST API\"\n}\n[/block]\nTo be able to connect to your database, you will need the connection parameters. Just navigate to your Database management area, and then click on the Connection tab. You should now see the connection settings you need.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3ed4c5f-connection_settings.png\",\n        \"connection_settings.png\",\n        1027,\n        610,\n        \"#f4f5f4\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIf you’re not relying on a driver, please use the transactional HTTP endpoint. It allows to run multiple queries within the scope of a transaction and it’s the preferred way instead of using the deprecated endpoint. You’ll find all the needed information about the transactional HTTP endpoint [here](http://neo4j.com/docs/stable/rest-api-transactional.html).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using new Bolt binary protocol\"\n}\n[/block]\nBolt is the new Neo4j binary protocol, which is designed for high-performance access to graph databases (read the release notes [here](http://neo4j.com/blog/neo4j-3-0-milestone-1-release/)).\n\nAll the necessary parameters to connect to your database via Bolt can be found if you navigate to the Connection tab on your database management area. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4a0f78e-connect_bolt.png\",\n        \"connect_bolt.png\",\n        1021,\n        494,\n        \"#f5f5f4\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"**The Bolt protocol is available in 3.0.0 or higher versions of Neo4j**. You can check your Neo4j version if you navigate to the Overview page of your database.\",\n  \"title\": \"\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Drivers and language guide\"\n}\n[/block]\nGrapheneDB runs vanilla Neo4j Community Edition. This means you can benefit from a whole range of open source libraries.\n\nNeo4j [supports drivers](http://neo4j.com/developer/language-guides/) for all major programming languages. You will find a list of drivers that we’ve previously verified to work well with GrapheneDB under the Connection settings section. You will also find configuration snippets for some of the most popular Neo4j drivers, as well as the generic connection settings.","excerpt":"","slug":"connecting-to-your-database","type":"basic","title":"Connecting to your database"}

Connecting to your database


There are a couple of different ways you can connect to your database. This article will cover how to connect using the Neo4j REST API or the new Bolt binary protocol. Which method you select will depend on your use case. If you want to develop an application there is a wide range of drivers you can use, some of them officially provided by Neo Technology, while others are developed by the community. Please take a look at our driver’s section to gain insight into your alternatives. [block:callout] { "type": "warning", "body": "Database credentials should never be published on the internet for security reasons. If you have exposed them, please contact with GrapheneDB support team and we will reset them for you.", "title": "Keep in mind:" } [/block] Let’s take a look at the two options Neo4j provides: * [Neo4j REST API](#using-neo4j-rest-api) * [New Bolt binary protocol](#using-new-bolt-binary-protocol) [block:api-header] { "type": "basic", "title": "Using Neo4j REST API" } [/block] To be able to connect to your database, you will need the connection parameters. Just navigate to your Database management area, and then click on the Connection tab. You should now see the connection settings you need. [block:image] { "images": [ { "image": [ "https://files.readme.io/3ed4c5f-connection_settings.png", "connection_settings.png", 1027, 610, "#f4f5f4" ], "sizing": "full" } ] } [/block] If you’re not relying on a driver, please use the transactional HTTP endpoint. It allows to run multiple queries within the scope of a transaction and it’s the preferred way instead of using the deprecated endpoint. You’ll find all the needed information about the transactional HTTP endpoint [here](http://neo4j.com/docs/stable/rest-api-transactional.html). [block:api-header] { "type": "basic", "title": "Using new Bolt binary protocol" } [/block] Bolt is the new Neo4j binary protocol, which is designed for high-performance access to graph databases (read the release notes [here](http://neo4j.com/blog/neo4j-3-0-milestone-1-release/)). All the necessary parameters to connect to your database via Bolt can be found if you navigate to the Connection tab on your database management area. [block:image] { "images": [ { "image": [ "https://files.readme.io/4a0f78e-connect_bolt.png", "connect_bolt.png", 1021, 494, "#f5f5f4" ] } ] } [/block] [block:callout] { "type": "info", "body": "**The Bolt protocol is available in 3.0.0 or higher versions of Neo4j**. You can check your Neo4j version if you navigate to the Overview page of your database.", "title": "" } [/block] [block:api-header] { "type": "basic", "title": "Drivers and language guide" } [/block] GrapheneDB runs vanilla Neo4j Community Edition. This means you can benefit from a whole range of open source libraries. Neo4j [supports drivers](http://neo4j.com/developer/language-guides/) for all major programming languages. You will find a list of drivers that we’ve previously verified to work well with GrapheneDB under the Connection settings section. You will also find configuration snippets for some of the most popular Neo4j drivers, as well as the generic connection settings.