<% mysql_grant_locations.each do |location| %>GRANT <%= mysql_grant_priv_type %> ON <%= db_name %>.* TO '<%= db_user %>'@'<%= location %>' IDENTIFIED BY '<%= db_pass %>'; <% end %> CREATE DATABASE IF NOT EXISTS <%= db_name %>; FLUSH PRIVILEGES;