I tried to use the following code to make the DB connection between my web application to Couchbase DB server and the result is successfully.
// Connect to localhost
Cluster cluster = CouchbaseCluster.create();
// Open the default bucket and the “beer-sample” one
Bucket defaultBucket = cluster.openBucket();
Bucket beerSampleBucket = cluster.openBucket(“beer-sample”);
// Disconnect and clear all allocated resources
Currently, I just need to provide the server and bucket names for making the DB connection between my App.
My question is, do we need to setup a login account for the DB login authentication?
In the Couchbase Server administrator dashboard, you’re able to assign passwords to your Couchbase buckets. If you’ve chosen to do this, then in your application layer you would provide a bucket password in addition to your server address and bucket name.
Does this answer your question?
Yes , this is what I want, many thanks…
How about couchbase lite, is there any password protected feature too?
Are you asking about CB Lite or Sync Gateway?
Regarding Sync Gateway, there are 2 ports you can connect to. 4984 is the public port exposed to the internet and 4985 the admin port only accessible on the internal network where SG is running. If you have an app server that connects to 4985, the easiest is to deploy it alongside SG. If you need to connect to port 4985 from the public network you can use ssh tunnelling.
I’m asking CB lite with password protection, thanks
Ah ok. There’s no password to access the database.
There is an experimental feature on iOS to encrypt the database, see this guide for more info.
This feature is not available in the .NET/Android SDK yet.
OK…So there is no CB lite encrypt feature on .NET/Android at this moment?
I am completely new to Couchbase. When I am trying to access a database the URL : http:// :4984/grocery-sync .It is asking me username and password , but I hav’ not created any username and password . I am confused then how to access this url .Could u pls help me out in this.