mirror of
https://github.com/jbranchaud/til
synced 2026-01-02 22:58:01 +00:00
Add Determine The Database Version as the first MongoDB til
This commit is contained in:
@@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||
|
||||
_903 TILs and counting..._
|
||||
_904 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -28,6 +28,7 @@ _903 TILs and counting..._
|
||||
* [JavaScript](#javascript)
|
||||
* [Linux](#linux)
|
||||
* [Mac](#mac)
|
||||
* [MongoDB](#mongodb)
|
||||
* [MySQL](#mysql)
|
||||
* [Phoenix](#phoenix)
|
||||
* [PostgreSQL](#postgresql)
|
||||
@@ -382,6 +383,10 @@ _903 TILs and counting..._
|
||||
- [Specify App When Opening From Command Line](mac/specify-app-when-opening-from-command-line.md)
|
||||
- [View All Windows Of The Current App](mac/view-all-windows-of-the-current-app.md)
|
||||
|
||||
### MongoDB
|
||||
|
||||
- [Determine The Database Version](mongodb/determine-the-database-version.md)
|
||||
|
||||
### MySQL
|
||||
|
||||
- [Display Output In A Vertical Format](mysql/display-output-in-a-vertical-format.md)
|
||||
|
||||
14
mongodb/determine-the-database-version.md
Normal file
14
mongodb/determine-the-database-version.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Determine The Database Version
|
||||
|
||||
Whether your Mongo database is local or remote, you should connect to it using
|
||||
the [`mongo` CLI](https://docs.mongodb.com/manual/mongo/).
|
||||
|
||||
Once connected, you can issue the following query:
|
||||
|
||||
```
|
||||
db.version()
|
||||
```
|
||||
|
||||
This will output the version of your Mongo database.
|
||||
|
||||
[source](https://docs.mongodb.com/manual/reference/method/db.version/)
|
||||
Reference in New Issue
Block a user