I'm creating a project in which I'm using mysqljs in Nodejs. But when I try to connect with database it gives error "ER_BAD_DB_ERROR: Unknown database 'hacker'", but this database exists.
connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : '',
database : 'hacker'
});
connection.connect();
But when changes the database name to 'test' it connects but when the database name is other then test then it give the above error ER_BAD_DB_ERROR.
Tried to reinstall XAMP but nothing changed.
via Pranav Anand
No comments:
Post a Comment