How to install node-mysql?

Im in window 7 cmd prompt ,, Im trying to install: npm install node-mysql

I get this:

 C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 npm ERR! 404 Maybe try 'npm search mysql' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, or http url, or git url. npm ERR! System Windows_NT 6.1.7600 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-mysql" npm ERR! cwd C:\Program Files\nodejs npm ERR! node -v v0.10.4 npm ERR! npm -v 1.2.18 npm ERR! code E404 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Program Files\nodejs\npm-debug.log npm ERR! not ok code 0 

How to fix it? I am trying to search for npm search node-mysql and I could not find it in the list

+2
source share
4 answers

Try:

 npm install mysql 

Node -msql ( https://github.com/felixge/node-mysql/blob/master/package.json ) is simply called mysql in package.json and exists under this name in the npm registry.

+9
source

Try

 npm install felixge/node-mysql 

Link: readme.md from https://github.com/felixge/node-mysql

0
source

Below are the steps to add a mysql module for node js

1 Open a command prompt

type npm install g-mysql for global use.

It takes time. The mysql module will not be installed in the nodejs host directory. Copy the module from the admin directory to the nodejs module folder.

To verify that the module is installed or not, go to the node js command prompt and type

require_resolve ('MySQL');

module path will be shown

0
source

Please follow the instructions that work for me:

  • Create a folder named mysql in this place:

     C:\Users\newusers\AppData\Roaming\npm\node_modules 
  • Then run the npm -g install mysql command

0
source

All Articles