title: Rake db error: ERROR 1102 (42000) at line 1: Incorrect database name [nil]
body: <p>I am getting the following error:</p>
  
  <blockquote>
    <p>$ rake db:drop<br>
    (in D:/Repository/MyApp)<br>
    ~ [datamapper] Setting up the "development" environment:<br>
    ~ [datamapper] Setting up :default repository: '' on mysql<br>
    ERROR 1102 (42000) at line 1: Incorrect database name ''  </p>
  </blockquote>
  
  <p>The following is my database.yml file:</p>
  
  <pre><code>defaults: &amp;defaults
    adapter: mysql
    encoding: utf8
    reconnect: false
    pool: 5
    username: dbuser
    password: ******
  
  development:
    database: myapp_development
    host: 127.0.0.1
    &lt;&lt;: *defaults
  
  test:
    database: myapp_test
    host: 127.0.0.1:3306
    &lt;&lt;: *defaults
  
  production:
    database: myapp_production
    host: mysql.myapp.com
    &lt;&lt;: *defaults
  </code></pre>
  
  <p>I'm running a mysql 5.5 server on a Windows platform, with Ruby 1.9.2 and Rails 3, and the server is configured with the proper databases, user and password. I'm using datamapper. This works on our live site, but not on my local site. Running 'rails dbconsole' produces "ruby192installationpath/dbconsole.rb:75: in 'exec': can't convert nil into String (TypeError).</p>
  
  <p>Has anyone run into this problem before? Any suggestions on how to diagnose or correct it? Or perhaps a simple diagnostic command that can be run from the terminal, rails or rake consoles to expose some information? Perhaps one that can verify it's connecting to the database, or if not what the problem is?</p>