Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node mysql

const mysql = require("mysql");

const db = mysql.createConnection({
	host: "localhost",
	user: "root",
	password: "",
	database: "dbname",
	charset: "utf8mb4_bin"
});

db.connect(err => {
	if(err) throw err;
});

module.exports = db;
 
PREVIOUS NEXT
Tagged: #node #mysql
ADD COMMENT
Topic
Name
8+3 =