Details
-
Bug
-
Resolution: Fixed
-
None
-
None
-
*Location*: http://developer.couchbase.com/documentation/server/4.1/developer-guide/querying.html
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
*Referrer*: http://developer.couchbase.com/documentation/server/4.1/developer-guide/query-workbench-intro.html
*Screen Resolution*: 1440 x 900
*Location*: http://developer.couchbase.com/documentation/server/4.1/developer-guide/querying.html *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9 *Referrer*: http://developer.couchbase.com/documentation/server/4.1/developer-guide/query-workbench-intro.html *Screen Resolution*: 1440 x 900
Description
Running cbq
cbq is an interactive shell for executing N1QL queries. It is shipped with Couchbase Server.
It is not in the system-wide path by default. To run it, invoke the full path to cbq. Copy/paste the following into your terminal:
Linux
"/opt/couchbase/bin/cbq"
Mac OS X
"/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbq"
Microsoft Windows
"C:\Program Files\Couchbase\Server\bin\cbq.exe"
Warning: By default, cbq tries to connect to the query service running locally on the current node. If no query service is running on the current node, a connection refused error will be returned whenever you attempt to execute a query. If you are running cbq remotely from a node, you can specify the --engine parameter and point the coq shell to connect to a node that has the query service.
For example:
cbq "--engine=http://URL_to_node_with_query_service:8093"