mycnf

    1.0.5 • Public • Published

    mycnf

    npm version Build Status npm downloads License Greenkeeper badge

    Reads MySQL options using my_print_defaults command.

    Install

    npm install mycnf --save
    

    Usage

    const mycnf = require('mycnf');
    const config = mycnf();
    //> { port: '3306', socket: '/tmp/mysql.sock' }
    

    Configuration Options

    • cmnd: Path to 'my_print_defaults' command. If no cmnd is provided, then 'my_print_defaults' command from $PATH is called.
    • file: Path of config file to read, defaults to reflecting MySQL config (usually ~/.my.cnf).
    • group: Name of config file group to parse, default to 'client'.

    Environment Variables

    • MYCNF_CMND
    • MYCNF_FILE
    • MYCNF_GROUP

    Install

    npm i mycnf

    DownloadsWeekly Downloads

    2

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    6.8 kB

    Total Files

    6

    Last publish

    Collaborators

    • honzahommer