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
cluster.disconnect();
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.
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.
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.
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.