I have a nodejs app which was running just fine all this time until I opened MySQL Workbench and also included `.env` file in my project. I was in the process of deploying the system to Digital Ocean managed database service when I opened MySQL Workbench to visualise the process and not use the mysql shell. Everything worked fine and I migrated my db on to the DO database cluster.

I also wanted to make my app more secure, so I bumped into the `.env` file method and tried my best to follow through and I came up with this:

Step 1:

```
npm i dotenv --save

```

Step 2: Added  `require('dotenv').config()` to my server.js file

Step 3: Update my DB connection file

```
    const mysql = require("mysql");
const conn = mysql.createConnection({
  host: process.env.HOST,
  user: process.env.USERNAME,
  password: process.env.PASSWORD,
  //rsport     : (process.env.PORT),
  database: process.env.DATABASE_NAME,
  multipleStatements: true,
});

conn.connect((err) => {
  if (err) {
    console.log("Oops!, Failed to connect to the database.");
  } else {
    console.log("Database connection succesfull!");
  }
});

module.exports = conn;

```

Step 4: I set my local .env file and remote .env file accordingly

Step 5: I run `nodemon` the it return the following error:

```
body-parser deprecated undefined extended: provide extended option server.js:27:17
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::3306
    at Server.setupListenHandle [as _listen2] (net.js:1318:16)
    at listenInCluster (net.js:1366:12)
    at Server.listen (net.js:1452:7)
    at Function.listen (G:\Maxiko Payment System\Systems\Management Apps\Microservices\mx-core\node_modules\express\lib\application.js:618:24)
    at Object.<anonymous> (G:\Maxiko Payment System\Systems\Management Apps\Microservices\mx-core\server.js:47:5)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
Emitted 'error' event on Server instance at:
    at emitErrorNT (net.js:1345:8)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'EADDRINUSE',
  errno: -4091,
  syscall: 'listen',
  address: '::',
  port: 3306
}
[nodemon] app crashed - waiting for file changes before starting...

```

What am I doing wrong? honestly I do not think .env has anything to do with this, but i definately know MySQL Workbench made its own connection. So am I to believe that only one application can connect to a database at one time? That doesnt sound right to me either.