title: What is a good way of Hiding mysql2 password when deploying with capistrano
body: <p>So, here is my capistrano file </p>
  
  <pre><code>load 'deploy/assets'
  require "bundler/capistrano" 
  set :application, "XXXXXX"
  set :repository,  "XXXXXX"
  
  set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
  # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
  set :repository , "XXXXXX"
  
  role :web, "XXXXXX"                          # Your HTTP server, Apache/etc
  role :app, "XXXXXX"                          # This may be the same as your `Web` server
  role :db,  "XXXXXX", :primary =&gt; true # This is where Rails migrations will run
  #role :db,  "your slave db-server here"
  
  set :user, 'root'
  set :use_sudo, false
  set :deploy_to, "/var/www/#{application}"
  set :deploy_via, :remote_cache
  set :normalize_asset_timestamps, false
  
  # if you want to clean up old releases on each deploy uncomment this:
  # after "deploy:restart", "deploy:cleanup"
  
  # if you're still using the script/reaper helper you will need
  # these http://github.com/rails/irs_process_scripts
  
  # If you are using Passenger mod_rails uncomment this:
  namespace :deploy do
  
    task :start do ; end
    task :stop do ; end
    task :restart, :roles =&gt; :app, :except =&gt; { :no_release =&gt; true } do
      run "touch #{File.join(current_path,'tmp','restart.txt')}"
    end
  end
  </code></pre>
  
  <p>Now when i run <code>cap deploy</code> i get an error</p>
  
  <pre><code>Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>I am assuming thats because my database.yml file is</p>
  
  <pre><code>development:
    adapter: sqlite3
    database: db/development.sqlite3
    pool: 5
    timeout: 5000
  
  # Warning: The database defined as "test" will be erased and
  # re-generated from your development database when you run "rake".
  # Do not set this db to the same as development or production.
  test:
    adapter: sqlite3
    database: db/test.sqlite3
    pool: 5
    timeout: 5000
  
  production:
      adapter: mysql2
      encoding: utf8
      database: XXXXX
      username: root
      password: 
      socket: /tmp/mysql.sock
  </code></pre>
  
  <p>Now since i have a public github account. I dont want to pass in my password and publish it to a github. And if I dont pass in the password i am unable to deploy the app. </p>
  
  <p>What is a good way to handle this problem?</p>
  
  <p>Thanks</p>