[Node.js]Node MySQL 연동하기(mysql 모듈 사용법)


[Node.js]Node MySQL 연동하기(mysql 모듈 사용법)

Node MySQL 연동하기(mysql 모듈 사용법) - mysql 모듈이란? - 연결 설정(Connect) - 연결 종료(end) - 연결 풀링(pool) - 쿼리 수행(Query) - 여러 쿼리문 수행 - 타임 아웃 - Express 및 mysql 모듈 설정 예시 mysql 모듈이란? mysql 모듈은 Node.js용 Mysql 드라이버입니다. JavaScript로 작서되었으며 컴파일이 필요하지 않고, MIT 라이선스로 존재합니다. 공식 문서: https://github.com/mysqljs/mysql → npm install mysql # mysql 모듈 설치 // 1. mysql 모듈 불러오기 const mysql = require('mysql'); // 2. DB Connection 생성 및 연결 const connection = mysql.createConnection({ host : 'localhost', port : 3306, user : 'root', password...


#Express #MySQL #node #Query #쿼리 #쿼리수행 #타임아웃

원문링크 : [Node.js]Node MySQL 연동하기(mysql 모듈 사용법)