server_address = STDIN.gets
user_name = STDIN.gets
#hogehoge
client = Mysql2::Client.new(:host => "#{server_address.chomp}", :username => "#{user_name.chomp}", :password => "#{user_password.chomp}" , :database => "#{database_name.chomp}")
最後のchompがないと STDIN.getsで\nも入力されて死ぬ。