I am getting started with mysql database for my NODEJS application const mysql = require('mysql2');
const pool = mysql.createPool({
host: 'localhost',
root: 'root',
database:'node-complete',
password: 'Pratik@123'
})
My root password is the one coded above.
I am getting this error:-
Ignoring invalid configuration option passed to Connection: root. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection
Can some help me to fix this issue?
module.exports = pool.promise()