title: Rails is not using password provided in database.yml
body: <p>I have a problem connecting to DB from my rails app.</p>
  
  <p>I have provided the database.yml file with credentials:</p>
  
  <pre><code>development: &amp;development
    adapter: mysql2
    encoding: utf8
    database: myapp_dev
    pool: 5
    username: root
    password: passoword
  
  test:
    &lt;&lt;: *development
    database: myapp_test
  
  production:
    &lt;&lt;: *development
    database: myapp_prod
  
  staging:
    &lt;&lt;: *development
    database: myapp_staging
  </code></pre>
  
  <p>But when I try run the app it gives me the following error:</p>
  
  <pre><code>Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>using <code>mysql -u root -p</code> with same credentials I can access my db without issues. can someone tell me what could be a problem here?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I've changed the user from root to some other user but it still gives me the same error. so apparently it uses some other credentials to connect to db.</p>