Notice: Constant WP_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 107

Notice: Constant WP_MAX_MEMORY_LIMIT already defined in /home/javawith/public_html/codesjava.com/wp-config.php on line 108
Delete Database in CouchDB - CodesJava

CodesJava

Easy learning with example program codes

Delete Database in CouchDB


Notice: Undefined variable: footnotelist in /home/javawith/public_html/codesjava.com/wp-content/plugins/latex2html/inc/core.php on line 475

CouchDB Delete Database

To delete databases in CouchDB one can either use the cURL utility or Fauxton web interface.

 

Using Fauxton:

  • Open the following URL: http://127.0.0.1:5984/_utils/
  • Click on the “Databases” tab to see all the existing databases.
  • Click on the delete icon of the database that you want to delete.
  • A pop-up message to confirm the database name will be displayed.
  • Write down the name of the database to be deleted.
  • Click on the DELETE button in the pop-up message.
  • The specified database is thus successfully deleted.

 

Using cURL utility:

Syntax:

curl -H 'Content-Type: application/json' \  

-X DELETE http://127.0.0.1:5984/database_name  

 

Example:

curl -H 'Content-Type: application/json' \

-X DELETE http://127.0.0.1:5984/company

Verification:

List out all the existing databases using the below command:

curl -X GET http://127.0.0.1:5984/_all_dbs  

The deleted database should not be in the list as it is deleted permanently.

 

Please follow and like us:
error









Copyright © 2019 CodesJava DMCA.com Protection Status