0.1.6 • Published 4 years ago

@server-state/mysql-state-module v0.1.6

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

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.

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago