@synor/database-mysql
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

Synor Database Version Coverage License

Synor Database MySQL

Synor Database Engine - MySQL

Installation

# using yarn:
yarn add @synor/database-mysql mysql2

# using npm:
npm install --save @synor/database-mysql mysql2

URI

Format: mysql://[user[:password]@][hostname][:port]/database[?param=value&...]

Params:

Name Description Default Value
ssl MySQL SSL Options undefined
synor_migration_record_table Name for Migration Record Table synor_migration_record

Examples:

  • mysql://root:root@127.0.0.1:3306/synor?synor_migration_record_table=migration_record
// SSL Example

const ssl = JSON.stringify({
  ca: '<path-to-file>',
  cert: '<path-to-file>',
  ciphers: '<string>',
  key: '<path-to-file>',
  passphrase: '<string>',
  rejectUnauthorized: '<boolean>',
}) // 'Amazon RDS'

const uri = `mysql://root:root@127.0.0.1:3306/synor?ssl=${encodeURIComponent(
  ssl
)}`

License

Licensed under the MIT License. Check the LICENSE file for details.

Package Sidebar

Install

npm i @synor/database-mysql

Weekly Downloads

256

Version

0.7.0

License

MIT

Unpacked Size

77.2 kB

Total Files

14

Last publish

Collaborators

  • muniftanjim