Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 17, 2024 via pnpm

mysql 2.18.1

A node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed.
Package summary
Share
0
issues
2
licenses
10
MIT
1
ISC
Package created
3 Jan 2011
Version published
23 Jan 2020
Maintainers
3
Total deps
11
Direct deps
4
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
bignumber.js@9.0.0
core-util-is@1.0.3
isarray@1.0.0
mysql@2.18.1
process-nextick-args@2.0.1
readable-stream@2.3.7
safe-buffer@5.1.2
sqlstring@2.3.1
string_decoder@1.1.1
util-deprecate@1.0.2

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
inherits@2.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of mysql 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
bignumber.js9.0.099.16 kBMIT
prod
readable-stream2.3.725.09 kBMIT
prod
safe-buffer5.1.29.59 kBMIT
prod
sqlstring2.3.16.18 kBMIT
prod

Visualizations

Frequently Asked Questions

What does mysql do?

MySQL is a Node.js driver written in JavaScript for MySQL database. MySQL driver does not require compiling and comes with 100% MIT license. The driver enables your Node.js applications to communicate with MySQL database, execute queries, handle responses, and perform CRUD operations.

How do you use mysql?

To use MySQL in Node.js, you firstly need to install the package using npm:

$ npm install mysql

Then in your Node.js script, require the MySQL package, create a connection using your database's credentials, and execute queries using the connection object.

Here is an example of how to use it:

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();

In the above code, mysql.createConnection is used to establish connection to MySQL. SQL queries are executed in sequence and not parallel. The connection.connect method is used to establish connection and connection.end is used to close the connection.

Where are the mysql docs?

The documentation for MySQL in Node.js can be found on the GitHub repository. The readme file of the repository itself provides extensive documentation covering installation, usage, API references, and other useful details. For more advanced topics, you can check out the issues and pull requests in the repository.

You can access the documentation at: https://github.com/mysqljs/mysql