NodeJS and MySQL from scratch

Recently I have came across NodeJS which is built on Chrome’s V8 and run on the server side. What make it special is that it’s pure event-driven, so it’s lightweight, fast and able to handle large amount of concurrent requests. In this post I’ll setup NodeJS and make it work with MySQL.

I’m using CentOS 6.2, but it should be more or less the same on different Linux distros. Note that you should have root permission to run most the the commands below. If not, please try adding “sudo” in front of the commands if you encounter some error.

Installing MySQL

> yum install mysql

It should do all the job
Start the service:
> service mysqld start
Make it start on bootup
> chkconfig mysqld on Continue reading