Nodejs如何连接数据库操作数据

简介 Nodejs本身是无法连接数据库的,要使用mysql模块,此模块提供了连接数据库的方法和连接池。 前提:按照mysql模块 安装命令:npm install mysql --save 创建连接: createConntion host:‘localhost’, port:3306,//端口号 user:root,//账号 password:123,//密码 database:‘smbms’/
相关文章
相关标签/搜索