title: Mysql2::Error: Access denied for user 'test'@'localhost' to database 'depot_test'
body: <p>I am a bit stumped here. I have created a database and have had no issues using the depot_production database. However, of late whenever I run rake test, I get a bunch of errors like </p>
  
  <pre><code># Running tests:
  
  EEEEEEEE
  
  Finished tests in 0.031499s, 253.9763 tests/s, 0.0000 assertions/s.
  
  1) Error:
  test_should_create_product(ProductsControllerTest):
  Mysql2::Error: Access denied for user 'test'@'localhost' to database 'depot_test'
  </code></pre>
  
  <p>The odd thing is I think my database.yml file is fine. And everytime I run db:migrate I just get an empty line returned to me. I also added a user test, but I think that only added it to my development database. I sorta think my test and production and databases don't exist...</p>
  
  <pre><code>development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: depot_development
  pool: 5
  username: root
  password: admin
  socket: /tmp/mysql.sock
  
  # Warning: The database defined as "test" will be erased and
  # re-generated from your development database when you run "rake".
  # Do not set this db to the same as development or production.
  test:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: depot_test
  pool: 5
  username: test
  password: testy
  socket: /tmp/mysql.sock
  
  production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: depot_production
  pool: 5
  username: prod
  password: mypassword
  socket: /tmp/mysql.sock
  </code></pre>
  
  <p>Any advice would be appreciated, thanks. </p>
  
  <p>Thanks for sticking with me here. I feel like I am close but something is odd. Here is what I did.  </p>
  
  <pre><code> mysql&gt; use depot_test;
  ERROR 1049 (42000): Unknown database 'depot_test'
  mysql&gt; show databases;
  +--------------------+
  | Database           |
  +--------------------+
  | information_schema |
  | depot_development  |
  | development        |
  | mysql              |
  | performance_schema |
  | test               |
  +--------------------+
  6 rows in set (0.01 sec)
  
  mysql&gt; use depot_test
  ERROR 1049 (42000): Unknown database 'depot_test'
  mysql&gt; use test
  Database changed
  mysql&gt; GRANT SELECT, INSERT, DELETE ON `test` TO test@'localhost' IDENTIFIED BY 'testy';
  ERROR 1146 (42S02): Table 'test.test' doesn't exist
  mysql&gt; GRANT SELECT, INSERT, DELETE ON `depot_test` TO test@'localhost' IDENTIFIED BY       'testy';
  ERROR 1146 (42S02): Table 'test.depot_test' doesn't exist
  </code></pre>