meandor/stirling-mysql

A MySQL wrapper for the sterling-microservice

0.2.2 2022-10-29 06:44 UTC

This package is auto-updated.

Last update: 2024-12-29 05:50:13 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock Build Status

A MySQL Database wrapper for the stirling-microservice

This library uses mysqli for database access. Please make sure you have mysqli enabled and ready to work on your server.

Usage

This library only works in conjunction with the stirling-microservice.

If you don't specify a config json (default.json) for your Config class with the following lines

{
    "dbHost": "<ip address>",
    "dbUser": "<my username>",
    "dbPassword": "<my password>",
    "dbName": "<my database name>",
    "dbPort": <port>
}

a default config will be used to try to establish a database connection.

The default is:

{
    "dbHost": "127.0.0.1",
    "dbUser": "root",
    "dbPassword": "",
    "dbName": "database",
    "dbPort": 3306
}