6

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

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.

Please let me know in step by step method.

NoNaMe
  • 6,020
  • 30
  • 82
  • 110
Kaushik Das
  • 405
  • 1
  • 5
  • 12

2 Answers2

7

Follow this tutorial. Tutorial Here

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

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.

Good luck!

Here is another few tutorials you might follow, Click Here

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.

Click Here

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

wuno
  • 9,547
  • 19
  • 96
  • 180
  • Any you tube tutorial link also well accepted, please grant me a very beginner of Node.js I know basic JS/JQ, as it is required for building sites for PHP. – Kaushik Das Jul 15 '15 at 08:25
  • If I am going to live it, then what will be the live server setup? – Kaushik Das Jul 15 '15 at 08:27
  • Ok I updated the answer with more tutorials. Basically you install npm on your computer, then use it to install any other dependencies you need. Once you install everything you can connect and use them. If you follow my instructions in the answer you will get up and running. – wuno Jul 16 '15 at 06:31
1

It might help to use this package Node Mysql Package. Also you can find the resources in the answer to this question here.

Community
  • 1
  • 1
phraniiac
  • 384
  • 1
  • 3
  • 16
  • If I am going to live it, then what will be the live server setup? – Kaushik Das Jul 15 '15 at 08:27
  • @kaushik You just need to install the package with npm ( node package manager) to begin. The link there is for a similar question. – phraniiac Jul 15 '15 at 08:32
  • Be elaborate with what you are asking for live server? I'm not able to get it. – phraniiac Jul 15 '15 at 08:36
  • Usually when we live our php project to a domain, we simply upload the files to server folder, it has Apache inbuilt with MySQL, I want to know that any specification is needed for node.js towards server end or it runs simultaneously? – Kaushik Das Jul 15 '15 at 09:10
  • Fir nodejs, you may try heroku to make your app live. – phraniiac Jul 15 '15 at 09:24