I am new to Node.js. Are we able to connect mysql with Node.js directly or we need any npm installation to perform it and if i am using nosql database like MongoDB then how can we connect it with node.js.
				
				Any time you need functionality in a Node.js project, look at NPMjs.org. There's a vibrant array of add on modules for Node.js that can enable you to accomplish all kinds of things quickly.
You can use the node-mysql module to connect to MySQL from Node.js.
npm install mysql
You can use node-mongodb-native to connect to MongoDB from Node.js.
npm install mongodb
				
			You need database driver to connect to any database like mysql,mongodb, neo4j etc. I haven't used mysql but quick search on www.npmjs.org reveals mysql https://npmjs.org/package/mysql as first options so go with it for start. For mongodb the most popular choices are mongodb https://npmjs.org/package/mongodb if you prefer to work with documents yourself or choose mongoose https://npmjs.org/package/mongoose if your prefer ORM. So just add them in your package.json dependencies and do npm install
 {
   "dependencies" : {
     "mongodb"   :  "*",
     "mysql" :  "*",
     "mongoose " :  "*"
    }
 }