I installed nodejs and mysql (also desktop)
I am creating a server using nodejs and mysql.
in my code I write:
var mysql = require('mysql'); var TEST_DATABASE = 'nodejs_mysql_test'; var TEST_TABLE = 'test'; var client = mysql.createClient({ user: 'root', password: 'root', }); client.query('CREATE DATABASE '+TEST_DATABASE, function(err) { if (err && err.number != mysql.ERROR_DB_CREATE_EXISTS) { throw err; } });
and the compiler gives me an error: Error: cannot find module 'mysql'
any ideas?
Thank you
source share