Created
January 9, 2020 09:07
-
-
Save dalcon10028/2dbab932d8ec6c8a43d09b1adc1f4570 to your computer and use it in GitHub Desktop.
MySQL with Node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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