Error:couldn ' t connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js
Generally this is the case that you specify the database, so you cannot. Automatically load the service. The second time we can't connect.
Each time before you start, manually, specify yourself, specify the database ha
CMD under F:/mdb>mongod--dbpath f:/mdb/data the following figure
It was successful to see the pict
Tags: log logs database operation record Ffline false data new Db.getcollection ('Product').Update({Status: "Offline"},{$Set: {status: "Online"}},false,true) update, change all status offline to online, note quotes db.collection.Update(criteria, objnew, Upsert, Multi) The description of the four parameters is as follows: The criteria:update query condition, similar to the Objnew:update object within the where in the SQL update query and some updated Operator (such as $, $inc ...
), and so on, c
::filesystem::create_directory:perm Ission denIED: "/tol/mongodb/data/_tmp/esort.1397502001.1410"Tue APR 03:00:01.672 [journal] in File::open ():: Open for '/tol/mongodb/data/journal/lsn ' failed with errno:13 Permiss Ion deniedTue APR 03:00:01.672 [Journal] warning:open of LSN file failed
+++ View permissions, the discovery has become MySQL's
[Root@localhost tol]# Ll-hTotal 28Kdrwx------2 MySQL MySQL 16K June 8 2013 Lost+foundDrwxr-xr-x 5 mysql MySQL 4.0K June 2013 MongoDBDrwxrwxr-x 3 mysql m
This problem always occurs when Ubuntu starts MONGO recently
root@ubuntu:/var/lib/mongodb# MONGO
MongoDB shell version:2.0.4
connecting to:test Tue 7 06:13:34 error:couldn ' t connect to server 127.0.0.1 shell/mongo.js:84
Exception:connect failed
Online Check the following operation is completely resolved
Find the
https://docs.mongodb.com/getting-started/shell/query/OverviewYou can use the find () method to issue a query to retrieve data from a collection in MongoDB.All queries in MongoDB has the scope of a single collection.Queries can return all documents with a collection or only the documents that match a specified filter or criteria.You can specify the filter or criteria in a document and pass as a parameter to the find () method.The find () method returns
After a short essay, the installation of MongoDB can be done after the most basic database operation, the following steps to achieve your Hello world!1. Open terminal Execution Brew services start MongoDB start MongoDB service, execute MONGO open shell operation;2. Show All DB: show dbs3. Enable a DB: Use mydb (if no mydb will automatically create this library)4. Display the table in the library:Show Tables
Shell translates into shell meaning, it is wrapped in the Linux kernel layer, a series of Linux commands can be issued to the operating system related instructions to the human-machine interface. The shell can combine a series of Linux commands with its conditional statement
Common Linux shell commands and shell commands
I. Basic commands
1. Shut down immediately and restart again. Execute the following command:
Shutdown-r now or reboot
2. Shut down immediately and execute the following command:
Shutdown-h now or poweroff
3. Wait for two minutes
Some common Shell commands and common Shell commands
Common system commands]
Passwd [hostname]Change Password
Useradd [hostname]Add User
Su-Switch to the root user
Ssh [hostname]Ssh connection
Cd [directory]Go to the directory
Sudo chown [username]Grant corresponding permiss
Execute shell commands and shell commands
First, name the shell command as a. sh file.
Save the above Code as test. sh and cd it to the corresponding directory:
Chmod + x./test. sh # grant the script execution permission./test. sh # execute the scriptIf the error/bin/bash
Use shell commands to analyze statistics logs and shell commands to collect statistics logs
When you need to collect user log information and analyze user behavior, you can use shell to conveniently retrieve a lot of data and place it in excel for statistics.
For example, fo
; "title=" clip_image004 "border=" 0 "alt=" clip_ image004 "src=" http://s3.51cto.com/wyfs02/M01/75/15/wKioL1YyOLeSUc4-AABleG0dA6k987.jpg "height=" "/>"Shell script execution: Simply save the various Linux commands you normally use in order to a text file, and then add executable permissions, this file becomes a shell script! Ps:chmod +x target file650) this.widt
Note and execute shell commands for Mysql queries. mysql executes shell commands.
Mysql query notes
1. when querying mysql, you must add the database prefix before the table. Otherwise, the database is the current database by default (when multiple databases are queried, duplicate queries may occur to the same table
Common commands and statements for Shell programming (SCRIPT) and Common commands for shellSome common Shell programming (SCRIPT) commands and statements can meet general requirements.Command Parameters received:
Number of parameters:
$ #
Parameter value:
Command itself
Summary of common shell commands and common shell commands
Umask
Set the default mode when creating a file. For a file, the maximum value is 6, and for a directory, the maximum value is 7.The system does not allow the creation of a text file to grant the executable permission, and the corresponding directory bit indi
8. find in shell commands and find in shell commands
The find command, which is commonly used like cd. however, most of the time, one or two parameters are enough. or, barely enough. however, when we take the initiative to look at the find manual, we will find that the more practical functions are not used.
This articl
1. shell script execution Method
There are two ways to execute shell scripts. One is to generate a new shell and then execute the corresponding shell scripts. The other is to execute the shell in the current shell and no longer en
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.