Skip to content

Commit 65559c8

Browse files
committed
Update Readme.md
Using latest version the commit dd04dc1 by marcuswestin
1 parent b525950 commit 65559c8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Readme.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ When establishing a connection, you can set the following options:
140140
* `database`: Name of the database to use for this connection (Optional).
141141
* `charset`: The charset for the connection. (Default: `'UTF8_GENERAL_CI'`)
142142
* `timezone`: The timezone used to store local dates. (Default: `'local'`)
143+
* `stringifyObjects`: Stringify objects instead of converting to values. See
144+
issue [#501](https://github.com/felixge/node-mysql/issues/501). (Default: `'false'`)
143145
* `insecureAuth`: Allow connecting to MySQL instances that ask for the old
144146
(insecure) authentication method. (Default: `false`)
145147
* `typeCast`: Determines if column values should be converted to native
@@ -869,14 +871,13 @@ will have:
869871

870872
## Running unit tests
871873

872-
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. (You may want to put these in a `config.sh` file and source it when you run the tests). Then run `make test`. E.g.
874+
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. (You may want to put these in a `config.sh` file and source it when you run the tests). Then run `make test`.
875+
876+
For example, if you have an installation of mysql running on localhost:3306 and no password set for the `root` user, run:
873877

874878
```
875-
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test_db"
876-
mysql -u root -e "CREATE USER 'node_mysql_test'@'localhost' IDENTIFIED BY ''"
877-
mysql -u root -e "GRANT ALL ON node_mysql_test_db.* TO 'node_mysql_test'@'%'"
878-
export MYSQL_DATABASE=node_mysql_test_db && export MYSQL_USER=node_mysql_test
879-
make test
879+
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test"
880+
MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_DATABASE=node_mysql_test MYSQL_USER=root MYSQL_PASSWORD= make test
880881
```
881882

882883
## Running unit tests on windows
@@ -885,11 +886,11 @@ Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYS
885886
* Make sure the database (e.g. 'test') you want to use exists and the user you entered has the proper rights to use the test database. (E.g. do not forget to execute the SQL-command ```FLUSH PRIVILEGES``` after you have created the user.)
886887
* In a DOS-box (or CMD-shell) in the folder of your application run ```npm install mysql --dev``` or in the mysql folder (```node_modules\mysql```), run ```npm install --dev```. (This will install additional developer-dependencies for node-mysql.)
887888
* Run ```npm test mysql``` in your applications folder or ```npm test``` in the mysql subfolder.
888-
* If you want to log the output into a file use ```npm test mysql > test.log``` or ```npm test > test.log```.
889+
* If you want to log the output into a file use ```npm test mysql > test.log``` or ```npm test > test.log```.
889890

890891
## Todo
891892

892893
* Prepared statements
893894
* setTimeout() for Connection / Query
894895
* Support for encodings other than UTF-8 / ASCII
895-
* API support for transactions, similar to [php](http://www.php.net/manual/en/mysqli.quickstart.transactions.php)
896+
* API support for transactions, similar to [php](http://www.php.net/manual/en/mysqli.quickstart.transactions.php)

0 commit comments

Comments
 (0)