Loopback Connector for MySQL
Go to file
Siddhi Pai 0acd9ef15a Drop support for Node v0.10 and v0.12 2016-11-19 01:02:44 -08:00
example Update eslint infrastructure 2016-08-10 20:04:26 -04:00
intl Update translation files - round#2 (#199) 2016-09-28 14:15:16 -07:00
lib Autoupdate mysql.columnName bug fix 2016-09-13 22:21:11 -06:00
test Add connectorCapabilities global object (#201) 2016-10-11 23:13:20 -07:00
.eslintrc Update eslint infrastructure 2016-08-10 20:04:26 -04:00
.gitignore Add translated files 2016-09-22 15:22:35 -04:00
.travis.yml Upd node version for travis 2013-03-27 20:32:13 +04:00
CHANGES.md 2.4.0 2016-10-17 13:20:42 +02:00
CONTRIBUTING.md Update URLs in CONTRIBUTING.md (#176) 2016-07-13 17:33:00 -07:00
LICENSE relicense as MIT only 2016-05-03 16:49:23 -07:00
NOTICE.md Add NOTICE and update READE 2013-10-30 23:02:12 -07:00
README.md Update README with correct doc links, etc 2016-10-31 17:02:14 -04:00
index.js Update eslint infrastructure 2016-08-10 20:04:26 -04:00
package.json Drop support for Node v0.10 and v0.12 2016-11-19 01:02:44 -08:00
pretest.js Fix pretest and init test configs 2016-08-19 10:56:19 -07:00

README.md

loopback-connector-mysql

loopback-connector-mysql is the MySQL connector module for loopback-datasource-juggler.

For complete documentation, see StrongLoop Documentation | MySQL Connector.

Installation

npm install loopback-connector-mysql --save

Basic use

To use it you need loopback-datasource-juggler.

  1. Setup dependencies in package.json:

    {
      ...
      "dependencies": {
        "loopback-datasource-juggler": "latest",
        "loopback-connector-mysql": "latest"
      },
      ...
    }
    
  2. Use:

        var DataSource = require('loopback-datasource-juggler').DataSource;
        var dataSource = new DataSource('mysql', {
            host: 'localhost',
            port: 3306,
            database: 'mydb',
            username: 'myuser',
            password: 'mypass'
        });
    

    You can optionally pass a few additional parameters supported by node-mysql, most particularly password and collation. Collation currently defaults to utf8_general_ci. The collation value will also be used to derive the connection charset.

Running Tests

The tests in this repository are mainly integration tests, meaning you will need to run them using our preconfigured test server.

  1. Ask a core developer for instructions on how to set up test server credentials on your machine
  2. npm test