Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Any way to find out why I can't connect to MySQL database... All I get is err response which is not helpful
Post Body

I have a node js and MySQL server running locally, and cannot find out why I am unable to connect. I am able to get the DB server running using the credentials, but all I get is the error message that was coded in and I would like to know if there is somewhere I can go to find out why it is not connecting successfully. I'm thinking it's either a syntax error (Hoping this isn't it I've been looking the file up and down) or maybe a permissions issue but just want to know how I can look into this further.

const mysql = require('mysql');

var mysqlConnection = mysql.createConnection({

`host: 'localhost',`

`user:'admin',`

`password: 'root',`

`database: 'myca'`

});

mysqlConnection.connect((err)=>{

if(!err)

    `console.log('DB connection actually worked :)');`

`else`

    `console.log('This sucks :( try something else ');`

});

Author
Account Strength
80%
Account Age
8 years
Verified Email
No
Verified Flair
No
Total Karma
5,570
Link Karma
239
Comment Karma
5,265
Profile updated: 14 hours ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago