diff --git a/railties/lib/commands/dbconsole.rb b/railties/lib/commands/dbconsole.rb index 17acb7b68f..442526ae32 100644 --- a/railties/lib/commands/dbconsole.rb +++ b/railties/lib/commands/dbconsole.rb @@ -41,6 +41,8 @@ when "mysql" if config['password'] && include_password args << "--password=#{config['password']}" + elsif config['password'] && !config['password'].empty? + args << "-p" end args << config['database']