title: Using brew upgrade Mongo update from 3.4 to 4.0 error: The data files need to be fully upgraded to version 3.6 before attempting an upgrade to 4.0
body: <pre><code>mongod
  </code></pre>
  
  <p>I got the following error</p>
  
  <p>** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.6 before attempting an upgrade to 4.0; see <a href="http://dochub.mongodb.org/core/4.0-upgrade-fcv" rel="noreferrer">http://dochub.mongodb.org/core/4.0-upgrade-fcv</a> for more details.</p>
  
  <p>But if I use</p>
  
  <pre><code>brew services start mongodb
  </code></pre>
  
  <p>then mongo server can start.</p>
  
  <p>To fix the mongod error</p>
  
  <p>I found the similar error thread</p>
  
  <p><a href="https://stackoverflow.com/questions/48318487/error-while-upgrading-mongodb-from-3-2-to-3-6">Error while upgrading Mongodb from 3.2 to 3.6</a></p>
  
  <p>So I downgraded to mongodb 3.6, and run</p>
  
  <pre><code>db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
  </code></pre>
  
  <p>and then reinstall mongodb 4.0, I still have the same error when I run </p>
  
  <pre><code>mongodb
  </code></pre>
  
  <p>I still have to use </p>
  
  <pre><code>brew services start mongodb
  </code></pre>
  
  <p>to start mongodb</p>
  
  <p>In command line, I run</p>
  
  <pre><code>&gt; db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
  { "featureCompatibilityVersion" : { "version" : "3.6" }, "ok" : 1 }
  &gt; 
  </code></pre>
  
  <p>It says featureCompatibilityVersion is 3.6</p>
  
  <p>What else I need to do to satisfy "The data files need to be fully upgraded to version 3.6 "?</p>
  
  <p>Thanks!</p>