aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/commands
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/commands')
-rw-r--r--railties/lib/commands/dbconsole.rb2
1 files changed, 2 insertions, 0 deletions
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']