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.
Run command : node -v and npm -v it gives node version ,If it shows then you installed the node successfully. Now Install Xampp (If not installed )download. html, and run Apache , If no error on, then we are almost done.
Create MySQL Database at the LocalhostOpen your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. Now click Edit privileges and go to Change Admin password, type your password there and save it. Remember this password as it will be used to connect to your Database.
In your WAMP Server home page PhpMyAdmin link appears. Click that link and the database connectivity form will open in the following format. After the page opens in your right side window, click database and choose to create database. Choose your database and create table or you have to restore your SQL database.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With