Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What MySQL driver for Node.js works on Windows?

I would like to use MySQL with Node.js on Windows. I have tried to use node-db-mysql, but it looks like it doesn't support Windows. Is there any other MySQL driver for Node.js that works on Windows?

like image 615
Jonas Avatar asked Jan 17 '12 00:01

Jonas


People also ask

Is MySQL compatible with node js?

Once you have MySQL up and running on your computer, you can access it by using Node.js. To access a MySQL database with Node.js, you need a MySQL driver.

What drivers are needed for MySQL?

JDBC, ODBC, and . Net drivers are necessary for MySQL as they enable the developers for building their database applications.

How do I run node js in MySQL?

Quick Start: How to Use MySQL in Node Create a new project: mkdir mysql-test && cd mysql-test . Create a package. json file: npm init -y . Install the mysql module: npm install mysql .

CAN node js work on Windows?

You can use the Node. js OS module to do things like check the platform and return a platform-specific variable: Win32/. bat for Windows development, darwin/. sh for Mac/unix, Linux, SunOS, and so on (for example, var isWin = process.


2 Answers

I haven't used it, but https://github.com/felixge/node-mysql is at least pure javascript, so it should not have the same cross-platform concerns as the one you posted, which is a js wrapper around a c++ library.

like image 176
Chris Sainty Avatar answered Oct 04 '22 02:10

Chris Sainty


node-mysql compatible mysql driver for node.js (node-mysql2), also works on Windows

like image 22
Andrey Sidorov Avatar answered Oct 04 '22 01:10

Andrey Sidorov