diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/commands/dbconsole.rb
+++ b/railties/lib/rails/commands/dbconsole.rb
@@ -20,7 +20,7 @@ module Rails
       ENV['RAILS_ENV'] = options[:environment] || environment
 
       case config["adapter"]
-      when /^mysql/
+      when /^(jdbc)?mysql/
         args = {
           'host'      => '--host',
           'port'      => '--port',
Fix rails dbconsole for jdbcmysql adapter.