Before the new db tasks I used as anyone a custom task. It used IO.popen("mysql -u root -p", 'w') to pipe SQL based on ActiveRecord::Base.configurations[RAILS_ENV]. The new db tasks assume the configured user can create and drop databases. Do you people actually grant those privileges?
I don't think there's any particular benefit to restricting
capabilities on my local dev box. I use the MySQL root user with no
password for all my Rails projects. Staging and production are a
different matter entirely, of course.