2013年8月28日星期三

MongoDB Learning Series (3)

 

evening prepared to continue to learn PHP + MongoDB, click Run_MongoDB_Service.bat file, which is what I wrote bat file that quick start MongoDB. But the command line flashed, I was very surprised. Yesterday evening to write code or normal, how to use today is not normal. I had to knock over the command manually. If not the same as before the interface, personally think it should be wrong. Error interface is as follows:

 

 

There are two main messages:

 

1.Unclean shutdown detected.

 

2 can resume reference: http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/ < / font>

 

 

Chrome open a Web page, for MongoDB to repair it. Of course, this problem should be caused by MongoDB also is running, and then I'll shut up. I shut down, even if the computer is still running a program to remind me that I basically point to continue. Unexpected Shutdown is estimated that this caused. References are given, if you turn MongoDB Journaling or replica set (replica set), you should use Replica Set Syncing (replication set synchronization). But I'm not turned on in the course of Journaling, nor configure replica set.

 

 

just start to feel, not that the file is damaged it? Directly delete all the files in the data directory. I later thought "MongoDB combat," the book does not say a, MongoDB has a strong migration and fault recovery mechanisms to recover as a direct hands-on direct data. Steps given in great detail, but there is little to show. In step, let us create a data0 file, I thought good recovery, the new file will exist data0 folder, and then I follow the steps after the repair is completed, I found data0 folder is empty, I once thought I repair failed the. Later, I follow the website steps to successful recovery of the database.

 

Special Note: The second step to delete mongod.lock file.

 

 

 

Gao Xiang students on the document a little Chinese translation. Page itself is on Linux, but under a change of windows system directory is ok. Well, to solve the problem, continue to learn MongoDB.

没有评论:

发表评论