Cannot Connect to MySQL with NodeJS, but can via Windows Powershell

I’ve seen many variations of this question, but I couldn’t find an answer – and in fact am not sure where to look for logs that could help me. Here’s the situation.

I was following this tutorial

I have the following in a file called “server.js”:

const mysql = require("mysql");
const express = require("express");
const bodyParser = require("body-parser");

var app = express();

app.use(bodyParser.json());

var mysqlConnection = mysql.createConnection({
    host: "localhost",
    user: "root",
    password: "confidential666!",
    database: "blunt",
    multipleStatements: true
});

mysqlConnection.connect((err)=>{
    if(!err){
    console.log("Connected");
        }
    else{
        console.log("connect failed");
        console.log("big woof");

    }
});

app.listen(3000);
console.log("did run");

I run this code with “nodemon server.js”

However, my console shows me “connect failed” and “big woof”.

I then tried to connect to my database with mysql.exe with the same credentials, and could connect to “blunt” just fine.

Port is missing from my connection, but documentation suggests 3306 is the default and that’s what my server is using. Adding it made no difference. Any idea on how I can figure out why I can’t get my nodemon to connect to my database?