What is the difference between MySQL & MySQL2 considering NodeJS

Eric Bishard picture Eric Bishard · Aug 17, 2014 · Viewed 37k times · Source

So I have read the following post"

What the difference between mysql and mysql2 gem

So far I have only used MongoDB with NodeJS and I want to be able to learn MySQL for any of my relational database needs. While researching MySQL & NodeJS I have found repositories for MySQL2 and it appears to have nothing in relation to the MySQL website, I'm assuming that there have been API's created that make it faster for developing with languages like NodeJS & Ruby. From a NodeJS standpoint, I'm assuming that I still run the regular MySQL database o my server, but I need to interact with it using these new API's like:

https://github.com/sidorares/node-mysql2/blob/master/README.md

I have also seen a site where they do performance benchmarks and NodeJS & MySQL come in very low for performance. and NodeJS & MySQL2 very High

Source for this info: php-nodejs-mysql-and-mongo

Image from this post:

enter image description here

Question: Do I simply use the regular MySQL database on my server and use this mysql2 API or is there a different implementation of MySQL that works with this API?

I have not used MySQL in about 10 years. I have only Used Microsoft's SQL Server. So I'm severely behind. I have started using NodeJS and figured that my best relational database options were MySQL, Is there something else I should look for?

Answer

monkeyinsight picture monkeyinsight · Aug 17, 2014

This is just 2 different APIs written by regular people. Difference is in syntax of commands and maybe in performance, just install both, make your own tests for your goals and choose one you think is more suitable for you.

Here is a comparison by NPMCompare: