I am attempting to connect to mySQL through a NodeJS file, but I receive the following error:
{ Error: ER_ACCESS_DENIED_ERROR: Access denied for user \'root\
If anyone is still facing problem. Try
var mysql = require("mysql"); var con = mysql.createConnection({ host: "127.0.0.1", user: "your_username", password: "password", database: "your_db_name" });