Where can I write my questio for couchbase

I used to practice on Couchbase queries on N1Q1 which is already provided with sample data

I mean that usually, I open this folder
and then I run the start_tutorial.bat and start learning

now I have got a Couchbase server and I have some queries
my questions

where can I find the place in Coucbase server to write my queries ?


To use the command-line interactive query tool ./cbq -engine=http://:8093/

To use the command-line interactive query tool ./cbq -engine=http://–couchbase-query-engine-server-name–:8093/


You need to connect your query engine to your Couchbase server. After that, you can use the cbq command-line shell to issue queries. Here are the instructions from query.couchbase.com:

Step 1. Expand the package archive
Step 2. Run ./start_tutorial.sh (On Windows start_tutorial.bat)
Step 3. Open http://localhost:8093/tutorial in your browser
To connect to a Couchbase Server ./cbq-engine -couchbase http://–couchbase-server-name–:8091/

Please comment here if you need more help.

Thanks for your answer but I still didn’t get it.

I tried your code ./cbq-engine -couchbase http://–couchbase-server-name–:8091/ but putting it into the web page that I got when opening the start tutorial.bat , but I got error, I tried put my server link in the start tutorial instead of the local host link, but that didn’t work. could you tell me please where should I put the cbq command? plus the server has a username and a password, where should I put them. thanks for the efforts

Hello, N1QL DP3 does not work with password-protected buckets.

The following command applies to the command-line, not your browser:

./cbq-engine -couchbase http://–couchbase-server-name–:8091/

Replace --couchbase-server-name-- with the actual name or IP address of your Couchbase server host.

cbq-engine and cbq are command-line programs.

Hello, I was able to query password-protected buckets by using the following command:

./cbq-engine -couchbase http://username:password@servername:8091/

where username/password are the credentials to log in the Couchbase console.

Hope it helps!

Thanks for sharing this!

That might be a separate issue. One of our engineers will troubleshoot that with you.


Unfortunately, it only works with empty buckets. If you try to query a bucket with a single document, it returns an error and you cannot even query buckets without password :frowning:

Thanks a lot!