mariano/node-db-drizzle — Issue #3: Can't get it to work with MySQL
Author: Ralle
Created: 2012-01-29 16:12:41+00:00
State: open

This is my code:
```var mysql = require("db-mysql");

self.db = new mysql.Database({
"hostname": "localhost",
"user": "root",
"password": "root",
"database": "my"
});

self.db.on('error', console.log);
self.db.on('ready', console.log);
self.db.connect();```

Here is the compile log
```> db-mysql@0.7.6 install /Users/ralle/Dropbox/Projects/my/node_modules/db-mysql
> node-waf configure build

Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
Checking for program mysql_config : /usr/local/mysql/bin/mysql_config
Checking for library mysqlclient_r : yes
'configure' finished successfully (0.393s)
Waf: Entering directory `/Users/ralle/Dropbox/Projects/my/node_modules/db-mysql/build'
[ 1/12] cxx: lib/node-db/binding.cc -> build/Release/lib/node-db/binding_1.o
[ 2/12] cxx: lib/node-db/connection.cc -> build/Release/lib/node-db/connection_1.o
[ 3/12] cxx: lib/node-db/events.cc -> build/Release/lib/node-db/events_1.o
[ 4/12] cxx: lib/node-db/exception.cc -> build/Release/lib/node-db/exception_1.o
[ 5/12] cxx: lib/node-db/query.cc -> build/Release/lib/node-db/query_1.o
[ 6/12] cxx: lib/node-db/result.cc -> build/Release/lib/node-db/result_1.o
[ 7/12] cxx: src/connection.cc -> build/Release/src/connection_1.o
[ 8/12] cxx: src/mysql.cc -> build/Release/src/mysql_1.o
[ 9/12] cxx: src/query.cc -> build/Release/src/query_1.o
[10/12] cxx: src/result.cc -> build/Release/src/result_1.o
[11/12] cxx: src/mysql_bindings.cc -> build/Release/src/mysql_bindings_1.o
[12/12] cxx_link: build/Release/lib/node-db/binding_1.o build/Release/lib/node-db/connection_1.o build/Release/lib/node-db/events_1.o build/Release/lib/node-db/exception_1.o build/Release/lib/node-db/query_1.o build/Release/lib/node-db/result_1.o build/Release/src/connection_1.o build/Release/src/mysql_1.o build/Release/src/query_1.o build/Release/src/result_1.o build/Release/src/mysql_bindings_1.o -> build/Release/mysql_bindings.node
Waf: Leaving directory `/Users/ralle/Dropbox/Projects/my/node_modules/db-mysql/build'
'build' finished successfully (2.304s)
db-mysql@0.7.6 ./node_modules/db-mysql ```

And here is the error I get:
```node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'prototype' of undefined
at extend (/Users/ralle/Dropbox/Projects/tipe/xmpp/node_modules/db-mysql/db-mysql.js:23:15)
at Object. (/Users/ralle/Dropbox/Projects/tipe/xmpp/node_modules/db-mysql/db-mysql.js:40:17)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object. (/Users/ralle/Dropbox/Projects/tipe/xmpp/tipe_datamanager.js:1:75)
at Module._compile (module.js:432:26)```