Panel / database.js
Niansuh's picture
Create database.js
818866f verified
raw
history blame
312 Bytes
const mysql = require('mysql2');
const db = mysql.createConnection({
host: '31.220.97.62',
user: 'myapi',
password: '57rfPPY8bsFBasXX',
database: 'myapi',
port: 3306
});
db.connect((err) => {
if (err) throw err;
console.log('Connected to MySQL Database');
});
module.exports = db;