The 'host' option specified in database.yml is being ignored on the create/drop/reset tasks.
The fix is pretty simple, ie: for 'drop' change to this:
host, user, password, database = config[:host], config[:user], config[:password], config[:database]
`mysql #{host ? "-h #{host}" : ''} -u #{user} #{password ? "-p#{password}" : ''} -e "drop database #{database}"`
Also note I've specified the CORRECT handling of a mysql password on commandline (no space after -p) and altered config[:username] to reflect the ACTUAL config entry config[:user] both of which I notice still haven't been fixed here despite having an open ticket about it for some months and the fix being dead simple to implement...
The 'host' option specified in database.yml is being ignored on the create/drop/reset tasks.
The fix is pretty simple, ie: for 'drop' change to this:
Also note I've specified the CORRECT handling of a mysql password on commandline (no space after -p) and altered config[:username] to reflect the ACTUAL config entry config[:user] both of which I notice still haven't been fixed here despite having an open ticket about it for some months and the fix being dead simple to implement...