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\
const pool = mysql.createPool({ host: 'localhost', user: 'root', database: 'database_name', password: 'your_pwd' });
make sure you have spelled the the keys and the properly. I was facing similar issue, then realised that I had written username instead of user