Skip to content

Instantly share code, notes, and snippets.

@dalcon10028
Created January 9, 2020 09:07
Show Gist options
  • Select an option

  • Save dalcon10028/2dbab932d8ec6c8a43d09b1adc1f4570 to your computer and use it in GitHub Desktop.

Select an option

Save dalcon10028/2dbab932d8ec6c8a43d09b1adc1f4570 to your computer and use it in GitHub Desktop.
MySQL with Node.js
const mysql = require('mysql');
var mysqlConnection = mysql.createConnection({
host : '13.124.119.246',
user : 'root',
password : 'root',
database : 'USER',
port : '56891'
});
mysqlConnection.connect((err)=>{
if (!err) {
console.log("연결됨");
}else{
console.log("연결 실패");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment