diff options
author | Steven Soroka <ssoroka78@gmail.com> | 2008-04-21 16:40:16 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-04-21 16:42:15 +1200 |
commit | f386676661068573d2b58f6bd7a7245b4ff5ce5d (patch) | |
tree | ae34971ad5ea09f544664edc2e79f6918ddfc0d4 /activerecord | |
parent | 6ef4239f8bd4d4ea7a5bc7f2cdaf14f87e6eb9a1 (diff) | |
download | rails-f386676661068573d2b58f6bd7a7245b4ff5ce5d.tar.gz rails-f386676661068573d2b58f6bd7a7245b4ff5ce5d.tar.bz2 rails-f386676661068573d2b58f6bd7a7245b4ff5ce5d.zip |
Use the rails user when creating and dropping the database rather than falling back to the currently logged in user who may or may not have CREATE / DROP privileges and no password.
Closes #11564 (trac)
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/Rakefile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile index b475b27037..50c120107b 100755 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -19,6 +19,8 @@ RELEASE_NAME = "REL #{PKG_VERSION}" RUBY_FORGE_PROJECT = "activerecord" RUBY_FORGE_USER = "webster132" +MYSQL_DB_USER = 'rails' + PKG_FILES = FileList[ "lib/**/*", "test/**/*", "examples/**/*", "doc/**/*", "[A-Z]*", "install.rb", "Rakefile" ].exclude(/\bCVS\b|~$/) @@ -46,16 +48,14 @@ end namespace :mysql do desc 'Build the MySQL test databases' task :build_databases do - %x( mysqladmin create activerecord_unittest ) - %x( mysqladmin create activerecord_unittest2 ) - %x( mysql -e "grant all on activerecord_unittest.* to rails@localhost" ) - %x( mysql -e "grant all on activerecord_unittest2.* to rails@localhost" ) + %x( mysqladmin --user=#{MYSQL_DB_USER} create activerecord_unittest ) + %x( mysqladmin --user=#{MYSQL_DB_USER} create activerecord_unittest2 ) end desc 'Drop the MySQL test databases' task :drop_databases do - %x( mysqladmin -f drop activerecord_unittest ) - %x( mysqladmin -f drop activerecord_unittest2 ) + %x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest ) + %x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest2 ) end desc 'Rebuild the MySQL test databases' |