如何将 node.js 连接到 mysql 和 wamp/xampp 服务器? [英] How to connect node.js to mysql and wamp/xampp server?

查看:56
本文介绍了如何将 node.js 连接到 mysql 和 wamp/xampp 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名 PHP 程序员,目前与 WP、CI、OC 合作.

I'm a PHP programmer and currently working with WP, CI, OC.

我是 node.js 的绝对初学者,想知道如何一步一步地连接 MySql 和 WAMP/XAMPP.

I am absolute beginner of node.js, want to know how to connect MySql and WAMP/XAMPP in step by step method.

如果我要直播,那么直播服务器的设置是什么.

If I am going to live it, then what will be the live server setup.

请告诉我分步方法.

推荐答案

遵循本教程.教程在这里

要使用 node.js,您需要安装数据包管理器 NPM 并使用它来安装项目的依赖项.

To use node.js you need to install the packet manager NPM and use it to install the dependencies of your project.

在我上面发布的示例教程中,他使用 NPM 安装所有依赖项,以按照您的要求连接到 mysql.他还提供了示例代码.

In the example tutorial I posted above hes uses NPM to install all his dependencies to connect to mysql just as you requested. He also provides sample code.

祝你好运!

这里还有一些您可能会遵循的教程,点击此处

Here is another few tutorials you might follow, Click Here

这使用 mongoDB 而不是 mysql,但遵循这个 tut 将帮助您更快地运行,然后您可以找到一些帮助 mySQL 的东西.

This uses mongoDB instead of mysql but following this tut will help you get things running quicker then you can find something to help with mySQL.

点击这里

使用上面的教程安装 npm 后,检查并确保已安装 npm,然后按照此 youtube 教程使用 node.js 设置 mysql.这是一个youtube视频.点击此处

After installing npm with the tutorial right above here and you check and make sure you have npm installed then follow this youtube tutorial to get mysql set up with node. And here is a youtube video. Click Here

这篇关于如何将 node.js 连接到 mysql 和 wamp/xampp 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆