Answer the question
In order to leave comments, you need to log in
How to connect to mysql server via node.js?
Good afternoon. Please tell me how to connect to mysql server on windows, now I have an error:
ER_NOT_SUPPORTED_AUTH_MODE
const pool = new Mysql('localhost', 'root', '', 'test', false);
pool.getConnection((err, connection) => {
if (err) {
return console.error(err.code, 'Error')
}
console.log('Connected!')
connection.release()
})
mysql.createPool({
host: this.host,
port: 3306,
user: this.user,
password: this.password,
database: this.database
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question