How to get the startup warning from MongoDB?
Answer:
The easiest way is login into the MongoDB using the shell, enter the command:
db.adminCommand({getLog: "startupWarnings" })
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to get the startup warning from MongoDB?
Answer:
The easiest way is login into the MongoDB using the shell, enter the command:
db.adminCommand({getLog: "startupWarnings" })
How to check the current MongoDB version
Answer:
Simply type the following command in your MongoDB's shell
db.version()
Install Redis server in Ubuntu
Answer:
The easiest way is to install using the PPA approach.
# sudo add-apt-repository ppa:rwky/redis
# sudo apt-get update
# sudo apt-get install redis-server
That's it.
Show the current privileges of a MySQL user
Answer:
To show the current privileges of a MySQL user, you can use the SHOW GRANTS statement
E.g.
mysql> SHOW GRANTS;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*****************************************' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
Show the current user in MySQL
Answer:
Like in the shell, we can execute the command whoami to find out the current user name, we can use the function CURRENT_USER();
E.g.
mysql> SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)