From be48c36578e0baf4056ce1266d1242cc8b211c95 Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Sat, 8 Nov 2008 11:38:36 -0600 Subject: [PATCH] If switching to default MySQL root user, save that username in MySQL config --- .../connection_adapters/mysql_adapter.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 1e452ae..659a1f6 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -48,7 +48,7 @@ module ActiveRecord host = config[:host] port = config[:port] socket = config[:socket] - username = config[:username] ? config[:username].to_s : 'root' + config[:username] = username = config[:username] ? config[:username].to_s : 'root' password = config[:password].to_s if config.has_key?(:database) -- 1.5.4.3