Can I use MYSQL like MongoDB with node.js for increasing the website speed.
Since Almost every popular programming language like Java or PHP provides driver to access and perform operations with MySQL.
Can I use MYSQL like MongoDB with node.js for increasing the website speed.
Since Almost every popular programming language like Java or PHP provides driver to access and perform operations with MySQL.
node-mysql is probably one of the best modules out there used for working with MySQL database which is actively maintained and well documented.
To install the MySQL node.js driver:
If you run just npm install mysql, you need to be in the same directory that your run your server. I would advise to do it as in one of the following examples:
For global installation:
npm install -g mysql
For local installation:
1- Add it to your package.json in the dependencies:
"dependencies": {
"mysql": "~2.3.2"
}
2- run npm install
in my personal openion, mysql is slower than postgres and mongo db