Sha256: 3a6f06eeabbcf53c381b59935fcd27a3b6b16f9655a1bb9ef87e9fb4b38ee06b

Contents?: true

Size: 730 Bytes

Versions: 3

Compression:

Stored size: 730 Bytes

Contents

# Mysql recipes
namespace :mysql do
  
  desc "Install mysql"
  task :install do    
    script_install("mysql/install.sh.erb")
  end
  
  desc "Install mysql monit hooks"
  task :install_monit do
    put load_template("mysql/mysql.monitrc.erb", binding), "/tmp/mysql.monitrc"        
    script_install("mysql/install_monit.sh")
  end
  
  desc "Create database user, and database with appropriate permissions"
  task :setup do    
    # Add localhost to grant locations
    locations_for_grant = [ "localhost", web_host ]
    
    put load_template("mysql/install_db.sql.erb", binding), "/tmp/install_db_#{application}.sql"    
    run "mysql -u root -p#{mysql_admin_password} < /tmp/install_db_#{application}.sql"
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capigen-0.1.1 recipes/mysql.rb
capigen-0.1.2 lib/recipes/mysql.rb
capigen-0.1.3 lib/recipes/mysql.rb