Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require('mysql');
- var connection = mysql.createConnection({
- host : 'localhost',
- user : 'root',
- password : 'root',
- database : 'dbname',
- port: '8889'
- });
- connection.connect(function(err) {
- if (err) {
- console.log("Error connecting to DB: " + err);
- throw err;
- }
- });
- TypeError: Cannot read property 'on' of undefined
- at Protocol._enqueue (/Applications/MAMP/htdocs/Angular2/myproject/node_modules/mysql/lib/protocol/Protocol.js:152:5)
- ...
- Error connecting to DB: Error: Connection lost: The server closed the connection.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement