Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require("mysql");
- // First you need to create a connection to the db
- var con = mysql.createConnection({
- host: "localhost",
- port: "3306",
- user: "root",
- password: "DIMbot%5452332",
- database : 'dimbotbd'
- });
- con.connect(function(err){
- if(err){
- console.log('Error connecting to Db');
- return;
- }
- console.log('Connection established');
- });
- con.end(function(err) {
- console.log('dasdasd');
- // The connection is terminated gracefully
- // Ensures all previously enqueued queries are still
- // before sending a COM_QUIT packet to the MySQL server.
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement