title: Rails no database name in connection
body: <p>Trying to run a rails app in prod on Ubuntu 16.04 and installed mysql <code>Ver 14.14 Distrib 5.7.24</code>, Ruby <code>2.5.3</code>, and using the <code>mysql2</code> gem. It works fine on my Mac 10.13. My Rails app can't seem to read the DB name in Ubuntu.</p>
  
  <p>Can't find the DB name:
  <code>
  {:adapter=&gt;"mysql2", :encoding=&gt;"utf8", :database=&gt;nil, :username=&gt;"myUser", :password=&gt;"secret", :host=&gt;"127.0.0.1", :port=&gt;3306}
  </code></p>
  
  <p>Then adds 127.0.0.1 as the DB name:
  <code>
  {:adapter=&gt;"mysql2", :encoding=&gt;"utf8", :database=&gt;"127.0.0.1", :username=&gt;"myUser", :password=&gt;"secret", :host=&gt;"127.0.0.1", :port=&gt;3306}
  </code></p>
  
  <p>My database.yml</p>
  
  <p><code>
  production:
    adapter: mysql2
    encoding: utf8
    database: mydb
    username: myUser
    password: secret
    host: 127.0.0.1
    port: 3306
  </code></p>
  
  <p>I've been pulling my hair out as to why I can't connect to the DB in my Ubuntu server. I can log into mysql through the CLI fine with the DB user fine.</p>
  
  <p>I'm also seeing the same issue on an Ubuntu box with Vagrant so thats consistent.</p>
  
  <p>Any help is extremely appreciative at this time.</p>
  
  <p>I have no idea but putting it in this format works. I tried everything else, different DB name, etc to no avail:</p>
  
  <p><code>production:
       url: mysql2://user:pass@localhost/myDb
  </code></p>
  
  <p>Thank you for your responses.</p>