nodejs,mysql The server closed the connection : I'm trying to Node.js and MySql but im receiving this error :
:Error: Connection lost: The server closed the connection. my code here.

    var mysql = require('mysql');
    var config ={
	 connectionLimit : 100,
        waitForConnections : true,
        queueLimit :0, 
        debug    :  true,
        wait_timeout : 28800,
        connect_timeout :10,
		host     : "localhost",
		user     : " root ",
		password : " root ",
		database	:	"mydb"
    };
    var table = 'mytable';
    var connection;
    function handleConnection(){
    connection = mysql.createConnection(config);
    connection.connect(function(err){
		console.log("connected");
		});
	connection.query('select * from' + table,
	function(err,result,fields){
	if (!err){
	console.log("result :" + result);
	} else{
		console.log("error1 :" +err);
	}	
	});
    }
Thanks in advance.