Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing information in Documentation #2543

Closed
azeezsodiqkayode opened this issue Jan 19, 2022 · 1 comment
Closed

Missing information in Documentation #2543

azeezsodiqkayode opened this issue Jan 19, 2022 · 1 comment
Labels

Comments

@azeezsodiqkayode
Copy link

azeezsodiqkayode commented Jan 19, 2022

There could be an addition to this

var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
  database : 'my_db'
});
 
connection.connect();
 
connection.query('SELECT 1 + 1 AS solution', function (error, results, fields) {
  if (error) throw error;
  console.log('The solution is: ', results[0].solution);
});
 
connection.end();


WHAT HAPPENS WHEN MY DEFAULT PORT IS IN USE 3306 
It should be stated that port can be declared 

var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
  database : 'my_db'
  port: "8800"
});
@mbaumgartl
Copy link

Hey!

The port property is already documented in the connection options.

Regards,
Marco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants