When naming projects that will spawn a database, be mindful of 16 character limit
Stefan has set up fantastic tools using Git and Capistrano and Rake to rapidly set up Drupal projects for Agaric. This documentation, private on MyAgaric.com, will be generalized and made public once we've worked out more bugs in the system.
This post isn't about this system specifically so much as a general caution.
If you have any setup to aid your deployment that automatically makes a database or user based on your project name, you have to be aware of MySQL's 16 character limit and do something to address this before the errors.
In this case editing the Capfile afterward works. In the automatically created version the set :db_name
line is set to "drupal\_#{application}" and the db_name to application. These auto-generated names – which meant the database name was "drupal_economicsforabetterworld" and the username "economicsforabetterworld" (far too long) have been replaced with the shortened acronym in the edited capfile excerpt shown below:
# vim:ft=ruby:ts=2:sw=2:et:
load "config/agaric.rb"
# Project configuration
set :application, "economicsforabetterworld"
# Webserver configuration
set :sites_available, "/etc/apache2/sites-available"
set :drupal_root, "/var/www/#{application}/drupal"
# Database configuration
set :db_file, "--defaults-file=/etc/mysql/drupal.cnf"
set :db_name, "efabw"
set :db_user, "efabw"
set :db_password do
chars = (('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a)
(1..8).collect{|a| chars[rand(chars.size)]}.join
end
Comments
Post new comment