Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

A module for querying the MySQL state show by "SHOW status;"

License

Notifications You must be signed in to change notification settings

server-state/mysql-state-module

Folders and files

NameName
Last commit message
Last commit date
Jul 15, 2020
Sep 27, 2019
Jun 3, 2020
Sep 27, 2019
Jun 3, 2020
Sep 27, 2019
Sep 27, 2019
Sep 27, 2019
Sep 27, 2019
Sep 27, 2019
Sep 27, 2019
Feb 16, 2022
Nov 25, 2021
Sep 27, 2019

Repository files navigation

mysql-state-module

Build Status GitHub npm version Coverage Status module type: official

A module for querying the state of a MySQL server. Its response will be a key-value-pair object of the results of

SHOW status;

Numeric values will get represented as numbers, 'YES' and 'ON' as true, 'NO' and 'OFF' as false and everything else as its raw stirng.

Example

To use the module, you'll need to pass a configuartion object containing the connect information to the SMF.

Since the module uses mysql2, which is mostly API-compatible with mysqljs/mysql, you may refer to https://github.com/mysqljs/mysql#connection-options for specifications. In most cases, though, you'll need to pass a host, a user, a password and possibly a port:

serverState.registerModule('mysql-state', require('@server-state/mysql-state-module'), {
	host: 'localhost',
	user: 'my-username',
	password: 'somePassword'
});

This official module belongs to the organization server-state.