@@ -67,29 +67,28 @@ Installation is done using the
67
67
[ ` npm install ` command] ( https://docs.npmjs.com/getting-started/installing-npm-packages-locally ) :
68
68
69
69
``` sh
70
- $ npm install mysql
70
+ $ npm install @vlasky/ mysql
71
71
```
72
72
73
- For information about the previous 0.9.x releases, visit the [ v0.9 branch] [ ] .
74
-
75
- Sometimes I may also ask you to install the latest version from Github to check
76
- if a bugfix is working. In this case, please do:
73
+ Sometimes you may be asked to install the latest version from Github to check
74
+ if a bugfix is working. In this case, please run:
77
75
78
76
``` sh
79
- $ npm install mysqljs /mysql
77
+ $ npm install vlasky /mysql
80
78
```
81
79
82
- [ v0.9 branch ] : https://github.com/mysqljs/mysql/tree/v0.9
83
-
84
80
## Introduction
85
81
86
- This is a node.js driver for mysql. It is written in JavaScript, does not
87
- require compiling, and is 100% MIT licensed.
82
+ This is a Node.js driver for mysql. It is a fork of [ mysqljs/mysql] ( https://github.com/mysqljs/mysql/ )
83
+ with partial support for the MySQL compressed protocol (reads compressed data sent by server)
84
+ and authentication using the caching_sha2_password plugin, the default authentication method in MySQL 8.
85
+
86
+ It is written in JavaScript, does not require compiling, and is 100% MIT licensed.
88
87
89
88
Here is an example on how to use it:
90
89
91
90
``` js
92
- var mysql = require (' mysql' );
91
+ var mysql = require (' @vlasky/ mysql' );
93
92
var connection = mysql .createConnection ({
94
93
host : ' localhost' ,
95
94
user : ' me' ,
@@ -118,20 +117,19 @@ From this example, you can learn the following:
118
117
Thanks goes to the people who have contributed code to this module, see the
119
118
[ GitHub Contributors page] [ ] .
120
119
121
- [ GitHub Contributors page ] : https://github.com/mysqljs /mysql/graphs/contributors
120
+ [ GitHub Contributors page ] : https://github.com/vlasky /mysql/graphs/contributors
122
121
123
- Additionally I'd like to thank the following people:
122
+ Thanks also go to the following people:
124
123
125
- * [ Andrey Hristov] [ ] (Oracle) - for helping me with protocol questions.
126
- * [ Ulf Wendel] [ ] (Oracle) - for helping me with protocol questions.
124
+ * [ Andrey Hristov] [ ] (Oracle) - for helping with protocol questions.
125
+ * [ Ulf Wendel] [ ] (Oracle) - for helping with protocol questions.
127
126
128
127
[ Ulf Wendel ] : http://blog.ulf-wendel.de/
129
128
[ Andrey Hristov ] : http://andrey.hristov.com/
130
129
131
130
## Sponsors
132
131
133
- The following companies have supported this project financially, allowing me to
134
- spend more time on it (ordered by time of contribution):
132
+ The following companies have supported this project financially:
135
133
136
134
* [ Transloadit] ( http://transloadit.com ) (my startup, we do file uploading &
137
135
video encoding as a service, check it out)
@@ -154,7 +152,7 @@ of the following:
154
152
The recommended way to establish a connection is this:
155
153
156
154
``` js
157
- var mysql = require (' mysql' );
155
+ var mysql = require (' @vlasky/ mysql' );
158
156
var connection = mysql .createConnection ({
159
157
host : ' example.org' ,
160
158
user : ' bob' ,
@@ -174,7 +172,7 @@ connection.connect(function(err) {
174
172
However, a connection can also be implicitly established by invoking a query:
175
173
176
174
``` js
177
- var mysql = require (' mysql' );
175
+ var mysql = require (' @vlasky/ mysql' );
178
176
var connection = mysql .createConnection (... );
179
177
180
178
connection .query (' SELECT 1' , function (error , results , fields ) {
@@ -398,7 +396,7 @@ provides built-in connection pooling using `mysql.createPool(config)`.
398
396
Create a pool and use it directly:
399
397
400
398
``` js
401
- var mysql = require (' mysql' );
399
+ var mysql = require (' @vlasky/ mysql' );
402
400
var pool = mysql .createPool ({
403
401
connectionLimit : 10 ,
404
402
host : ' example.org' ,
@@ -420,7 +418,7 @@ share connection state for subsequent queries. This is because two calls to
420
418
the basic structure:
421
419
422
420
``` js
423
- var mysql = require (' mysql' );
421
+ var mysql = require (' @vlasky/ mysql' );
424
422
var pool = mysql .createPool (... );
425
423
426
424
pool .getConnection (function (err , connection ) {
@@ -1255,7 +1253,7 @@ fatal error is triggered by trying to connect to an invalid port. Therefore the
1255
1253
error object is propagated to both pending callbacks:
1256
1254
1257
1255
``` js
1258
- var connection = require (' mysql' ).createConnection ({
1256
+ var connection = require (' @vlasky/ mysql' ).createConnection ({
1259
1257
port: 84943 , // WRONG PORT
1260
1258
});
1261
1259
@@ -1369,7 +1367,7 @@ It is not recommended (and may go away / change in the future) to disable type
1369
1367
casting, but you can currently do so on either the connection:
1370
1368
1371
1369
``` js
1372
- var connection = require (' mysql' ).createConnection ({typeCast: false });
1370
+ var connection = require (' @vlasky/ mysql' ).createConnection ({typeCast: false });
1373
1371
```
1374
1372
1375
1373
Or on the query level:
0 commit comments