nearinfinity/node-db-migrate — Issue #11: Doesn't seem to respect mysql config options
Author: grahamc
Created: 2012-03-06 03:19:27+00:00
State: open

Unless I'm completely screwing it up.

Here's my database.json:

```javascript
/* database.json */
{
"dev": {
"driver": "mysql",
"user": "username",
"password": "password",
"database": "database"
}
}
```

And how I'm executing it:

```
./node_modules/db-migrate/bin/db-migrate --config database.json -e dev up --verbose
[INFO] Using config: { driver: 'mysql',
user: 'username',
password: 'password',
database: 'database' }
[ERROR] { [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' }
```

But here is evidence I can connect with those connection parameters:

```
$ mysql -uusername -ppassword database
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 273
Server version: 5.1.41-3ubuntu12.10-log (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
Empty set (0.00 sec)
```

Of course I changed the parameters to protect the innocent.