Skip to content

ER_NOT_SUPPORTED_AUTH_MODE #2499

@alexsaelao

Description

@alexsaelao

code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
sqlState: '08004',
fatal: true

I have this problem, pleases recomend how to fix that
Thou you very much

My code:

const {
    createPool 
} = require('mysql');

const pool = createPool ({
    host: "127.0.0.1",
    user: "root",
    password: "",
    database: "api_db",
    connectionLimit: 10
})

pool.query(`SELECT * FROM po_view`, (err, result, field) => {
    if(err) {
        return console.log(err);
    } 
    return console.log(result)
})

module.exports = pool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions