title: Knex:Error Pool2 - error: password authentication failed for user "username" (Not using UNIX account)
body: <p>The problem occurs with the following command:</p>
  
  <p><code>knex --knexfile config/db/knexfile.js migrate:latest</code></p>
  
  <p>I get the following error:</p>
  
  <pre><code>Knex:warning - Pool2 - Error: Pool was destroyed
  Knex:Error Pool2 - error: password authentication failed for user "dennis"
  Knex:Error Pool2 - error: password authentication failed for user "dennis"
  Error: Pool was destroyed
      at Pool._destroyPool (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:560:20)
      at Pool.&lt;anonymous&gt; (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:474:18)
      at Pool.&lt;anonymous&gt; (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:517:17)
      at tryCatcher (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/util.js:16:23)
      at Promise.errorAdapter [as _rejectionHandler0] (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/nodeify.js:35:34)
      at Promise._settlePromise (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:558:21)
      at Promise._settlePromise0 (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:606:10)
      at Promise._settlePromises (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:681:18)
      at Async._drainQueue (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:138:16)
      at Async._drainQueues (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:148:10)
      at Immediate.Async.drainQueues (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:17:14)
      at runCallback (timers.js:570:20)
      at tryOnImmediate (timers.js:550:5)
      at processImmediate [as _immediateCallback] (timers.js:529:5)
  </code></pre>
  
  <p>It seems like it is not using my UNIX account and instead trying to authenticate using username/password.</p>
  
  <p>I have tried the following solutions:</p>
  
  <ul>
  <li>Update <code>pg</code> to the latest</li>
  <li>Update <code>knex</code> to the latest</li>
  <li><p>replace the method to trust from:</p>
  
  <p><code># IPv4 local connections: host all all 127.0.0.1/32 trust</code></p></li>
  <li><p>replace the connection string from <code>[db name]</code> to <code>[postgres://[db name]</code>:</p>
  
  <pre><code>connection: {
    database: 'postgres://data-api-dev',
    user:     '',
    password: ''
  },
  </code></pre></li>
  </ul>
  
  <p>How to I get it to use my UNIX account?</p>
  
  <p>I am on Ubuntu 16.04 using Node v6.3.1.</p>
  
  <p>Here are my installed packages:</p>
  
  <pre><code>├── bluebird@2.10.2
  ├── body-parser@1.15.2
  ├── bookshelf@0.10.0
  ├── chai@3.5.0
  ├── chai-as-promised@5.3.0
  ├── colors@1.1.2
  ├── convict@1.4.0
  ├── cors@2.7.1
  ├── express@4.14.0
  ├── gulp@4.0.0-alpha.2 (git://github.com/gulpjs/gulp.git#d8f5c90a0622d19ef1943a2a3d02dc50e3c853e7)
  ├── gulp-exit@0.0.2
  ├── gulp-mocha@2.2.0
  ├── gulp-nodemon@2.1.0
  ├── gulp-using@0.1.0
  ├── jsonwebtoken@5.7.0
  ├── knex@0.11.10
  ├── lodash@3.10.1
  ├── pg@6.1.0
  ├── request-promise@0.4.3
  ├── sinon@1.17.5
  ├── sinon-as-promised@4.0.2
  ├── sinon-chai@2.8.0
  ├── supertest@1.2.0
  └── validator@4.9.0
  </code></pre>