Label:One, Mongodump backup database 1, Common command grid
1
mongodump -h IP --port 端口 -u 用户名 -p 密码 -d 数据库 -o 文件存在路径
If there is no user who can remove-u and-P. If you export the native database, you can remove-H. If it is the default port, you can remove--port. If you want to export all databases, you can remove-D. 2. Export all databases
1 2 3 4 5 6 7 8 9 10
[[emailprotected] mongodb]# mongodump -h 127.0.0.1 -o /home/zhangy/mongodb/ con
One, Mongodump backup database
1, Common command grid
Mongodump-h IP--port Port-u user name-p password-d database-o file existence path
If there are no users who can remove-u and-P.If you export the database for this computer, you can remove-H.If it is the default port, you can remove the--port.If you want to export all databases, you can remove-D.
2, export all databases
[Root@localhost mongodb]# mongodump-h 127.0.0.1-o/home/zhangy/mongodb/
connected to:127.0.0.1
Tue
15-status Mode
There are more than one kind of sub-categories in Starcraft. For example, a tank can be mounted, a gun can play doping, or even some passive ones. For example, after being sprayed with green liquid by the Queen of worms, the enemy's actions are slowing down.If we operate a soldier every time, like a tank, we need to use if to judge his status.CodeThere will be a lot of IF, else or swith.How
As mentioned above, the installation of coreseeksphinxmmsegmysql and so on will explain how to use it. One, coreseeksphinx start, there will be an extra port, and can log on like mysql, but not login mysql [root @ localhosttank] # mysql-h127.0.0.1-P9306 is not really connected to mysql, but connected to sphinxin
As mentioned above, the installation of coreseek sphsf-mmseg mysql and so on will explain how to use it. 1. After coreseek sphek is started, an additional port is added and can be logged
, declares the method of producing automobiles.Car: Car realization class.Trunk: Truck implementation class.Iengine: Engine product interface, declares the method of producing the engine.Carengine: Car engine implementation class.Trunkengine: Truck engine implementation class.Itank: Fuel tank Product Interface, declare the method of producing tank.Cartank: Car fuel tank products.Trunktank: Truck fuel
is specific ),ExpThe corresponding type. The same rule applies to concept * or concept .
Concept conversion. It is similar to performing conversions on the inheritance structure of classes. Refined concept can be implicitly converted to base concept. In turn, it must be performed explicitly and executed using the concept_cast operator. The concept must also be converted using concept_cast.
Concept-based overload can also be executed at runtime to implement generalized dynamic-dispatch operati
> Db.adduser (' Tank ', ' test '); Add an administrator account
{
"user": "Tank",
"readOnly": false,
"pwd": "988432606980d0695e4f668f6bbc643a",
"_id": ObjectId ("529e5d543b6a4608ac833429")
}
Third, open the user authority to start authentication
[Root@localhost zhangy]# vim/etc/mongodb.conf //Remove the comments in front of Auth=true
[root@localhost zhangy]#/etc/init.d/ Mongod
The three php functions used to parse the url are used to pass values through the url, which is an important means of passing values in php. Therefore, we often need to parse the parameters in the url. if we know the url passing parameter name, such as/index. php? Name = tank amp; sex = 1 # top we can use $ _ GET ['name'], $ _ GET ['sex'] to obtain the three php functions to parse the url
Passing values through URLs is an important means of passing
// Add the prefix number-d, -- repeated, indicating the number of occurrences of the corresponding row in front of each row. // only duplicate rows-D are output, -- all-repeated // only outputs duplicate rows, but several rows output the number of-f, -- skip-fields = N //-f ignored segments, -f 1 ignores the first section-I, -- ignore-case // case insensitive-s, -- skip-chars = N // The root-f is a bit like, however,-s is ignored. When-s 5 is followed, the next five characters www.2cto.com-u, -
(Host), the pool has a lot of water (4GB of physical memory), there are 2 tanks (configured 2 VMS), the water tank has a certain capacity (configuration memory is 4GB), originally was empty (no boot).But now the tank 1 to raise fish, must put some water in so that the fish can survive (boot up). Minimum 1GB of memory is required. So the Tank 1 (VM1) to the pool
To:tank
> Use admin//Switch to admin database
Switched to DB admin
> Show Collections;
System.indexes
System.users//user table
> Db.system.users.find (); User table has no data
> Db.adduser (' Tank ', ' test '); Add an Administrator account
{
"User": "TestUser",
"ReadOnly": false,
"pwd": "988432606980d0695e4f668f6bbc643a",
"_id": ObjectId ("529e5d543b6a4608ac833429")
}
Third, open the user authority to start authenticat
// display the version information and exit it -z doesn't know how to use it.
3, test the text file uniqtestthis is a test this is a test I am tank I love tank this is a test whom have a try WhoM have a try you have a try I want to abroad those are good men we are good men
IV, instance details [zhangy @ BlackGhost mytest] $ uniq-c uniqtest 3 this is a test 1 I am tank
restoration of all databases
1. All Database backups
Copy codeThe Code is as follows:# Innobackupex -- defaults-file =/etc/my. cnf -- user = root/home/tank/backup/
If the following error is reported:
Copy codeThe Code is as follows:InnoDB: Error: log file./ib_logfile0 is of different size 5242880 bytesInnoDB: than specified in the. cnf file 50331648 bytes!Innobackupex: Error: The xtrabackup child process has died at/usr/bin/innobackupex line 2679.
So
The hero of World War II is a game I like very much. Although it was a bit old in years, I always took it out for a long time.
There is no repair box in the reward task "tank attack". It is a pity to watch the damaged tanks. some people say that they want to use mod, but they haven't found the legendary tank repair mod for a long time and finally found a method to modify the archive. share it! Although prog
Document directory
Gof Definition
Motivation
Key points of the decorator Mode
Gof Definition
Dynamically add some additional responsibilities to an object. The decorator mode is more flexible than the subclass generation function.
Let's take a look at a small example. If we need to develop a tank for the game, apart from the tanks of different models, we also hope to add one or more of the following features to tanks in different scenarios: infra
backup and restore1, all database backups
The code is as follows
Copy Code
# Innobackupex--DEFAULTS-FILE=/ETC/MY.CNF--user=root/home/tank/backup/If you report the following error:InnoDB:Error:log file./ib_logfile0 is of different size 5242880 bytesInnodb:than specified in the. cnf file 50331648 bytes!Innobackupex:Error:The xtrabackup child process has died At/usr/bin/innobackupex line 2679.Workaround: Add the following in
error:or No ' datadir ' option in the group ' mysqld ' in MySQL options
Third, all database backup and restore
1, all database backup
Copy Code code as follows:
# Innobackupex--DEFAULTS-FILE=/ETC/MY.CNF--user=root/home/tank/backup/
If you report the following error:
Copy Code code as follows:
InnoDB:Error:log file./ib_logfile0 is of different size 5242880 bytes
Innodb:than specified in the. cnf f
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.