Corrupted packets out of order message in nodejs and mysql

Nigel Wright 291 Reputation points
2021-04-02T13:45:52.947+00:00
var mysql = await require('MySQL80');

var con = await mysql.createConnection({
    host: "localhost",
    user: "root",
    password: "75577557",
    debug: true,
    database: "mydb"
});

await con.connect(function (err) {
    if (err) throw err;
    await res.write("Connected!");
    await con.query("CREATE DATABASE mydb;", function (err, result) {
        if (err) throw err;
        await res.write("Database created");

        res.end("");

    });
});

Simple piece of node js and mysql code.
I get a corrupted error message
J���
8.0.23� ���5
l p- L�ےےے �ےد ����������Ba5 eS
'Hl@H�caching_sha2_password�!�� ے„ #08S01Got packets out of order
Any help would be appreciated.

Community Center | Not monitored
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.