Module: Shnell::Actions::Database
Instance Method Summary collapse
Methods included from Config
#config, #db_credentials, #db_password, #db_user, #ftp_host, #ftp_password, #ftp_user, #read_config, #write_config
Instance Method Details
#create_database(name, user, password) ⇒ Object
6 7 8 9 10 |
# File 'lib/shnell/actions/database.rb', line 6 def create_database(name, user, password) report :create_db, name system "mysqladmin #{db_credentials} create #{name}" system "mysql #{db_credentials} -e \"GRANT ALL ON #{name}.* TO '#{user}'@'localhost' IDENTIFIED BY '#{password}'\"" end |