title: Node.js mysql2 module can't connect
body: <p>I'm having a problem connecting to a database through the mysql2 module for Node.js.</p>
  <p>Everything worked, before I deleted some file to do with Git.
  After reinstalling everything trying to fix it... still doesn't work.</p>
  <p>Node outputs:</p>
  <p>Error: connect ECONNREFUSED ::1:3306
  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
  Emitted 'error' event on Connection instance at:
  at Connection._notifyError</p>
  <pre><code>at Socket.emit (node:events:513:28)
  at emitErrorNT (node:internal/streams/destroy:151:8)
  at emitErrorCloseNT (node:internal/streams/destroy:116:3)
  at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  </code></pre>
  <p>errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '::1',
  port: 3306,
  fatal: true</p>
  <p>edit:
  In my connection I specify localhost as the host,
  and I can connect to the database in the terminal
  using the same user as my connection object.</p>