Datagrip mongodb create database8/11/2023 ![]() ![]() This data could be a collection or a document. MongoDB only creates the database when you first store data in that database. If you enter the show dbs command, the result should still be the same: > show dbs Note that, for now, only the context has been changed. In order to create a database, you will first need to switch the context to a non-existing database using the use command: > use myshinynewdb There is no “create” command in the MongoDB Shell. Note that admin and local are databases that are part of every MongoDB cluster. Once you have access to a cluster via the MongoDB Shell, you can see all the databases in the cluster that you have access to using the “show” command: > show dbs
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |