1、在工程目录下运行npm install mysql安装用于nodejs的mysql模块;
npm install mysql
2、创建db.js模块用于连接mysql,同时定义query查询方法;
3、查询示例