Skip to content

'host' from database.yml is ignored on create/drop/reset tasks #3

Open
@anomaly256

Description

@anomaly256

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions