Solve the problem that node. js USES MySQL to connect econnunion 127.0.0.0.1:3306

const sequelize = new Sequelize('mysql', 'account', 'password', {
    host: 'localhost',
    // host: '118.25.35.81',
    dialect: 'mysql',
    operatorsAliases: false,
    dialectOptions: {
        charset: "utf8mb4",
        collate: "utf8mb4_unicode_ci",
        supportBigNumbers: true,
        bigNumberStrings: true
    },
    socketPath: '/tmp/mysql.sock',
    pool: {
        max: 5,
        min: 0,
        acquire: 30000,
        idle: 10000
    },
    timezone: '+08:00' 
});

solution :

socketPath: '/tmp/mysql.sock',

Read More: