How to connect node.js to mysql and wamp/xampp server?

前端 未结 2 410
猫巷女王i
猫巷女王i 2021-02-10 08:37

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.<

2条回答
  •  隐瞒了意图╮
    2021-02-10 09:34

    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

提交回复
热议问题