const mysql = require("mysql");

const db = mysql.createConnection({
    host: "localhost",
    port: 3306,
    user: "root",
    password: "succes",
    database: "sp_partner",
    multipleStatements: true
});

db.connect(err => {
    if (err) {
        console.error("Connection MySQL failed:", err.message);
        return;
    }
    console.log("Connected to MySQL database");
});

module.exports = db;
