Skip to content

Commit 106537b

Browse files
add documentation
1 parent 4855623 commit 106537b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ npx mysql-memory-server@latest --version 8.4.x
7878
- `port: number`
7979
The port that the MySQL database is listening on
8080
- `xPort: number`
81-
The port that MySQLX is listening on
81+
The port that MySQLX is listening on. If MySQL X is turned off, or ```options.xEnabled``` is set to "ON" and the X Plugin fails to initialise, this value will be -1.
8282
- `dbName: string`
8383
The database that was created on database initialization
8484
- `username: string`
8585
The name of the user to use to login to the database
8686
- `socket: string`
8787
If on Windows, this is the name of the named pipe that MySQL is listening on. If not on Windows, this is the path to the socket that MySQL is listening on.
8888
- `xSocket: string`
89-
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on.
90-
- `mysql: {version: string, versionIsInstalledOnSystem: boolean}`
91-
An object with two properties. ```version``` is the version of MySQL used to create the database. ```versionIsInstalledOnSystem``` will be true if the MySQL version used is already installed on the system and false if the version had to be downloaded from MySQL's CDN.
89+
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on. If MySQL X is turned off, or ```options.xEnabled``` is set to "ON" and the X Plugin fails to initialise, this value will be an empty string.
90+
- `mysql: {version: string, versionIsInstalledOnSystem: boolean, xPluginIsEnabled: boolean}`
91+
An object with three properties. ```version``` is the version of MySQL used to create the database. ```versionIsInstalledOnSystem``` will be true if the MySQL version used is already installed on the system and false if the version had to be downloaded from MySQL's CDN. ```xPluginIsEnabled``` will be true if ```options.xEnabled``` is set to "FORCE", will be false if ```options.xEnabled``` is set to "OFF", and if ```options.xEnabled``` is set to "ON", this value will be true if the plugin initialised successfully, otherwise this value will be false.
9292
- `stop: () => Promise<void>`
9393
The method to stop the database. The returned promise resolves when the database has successfully stopped.
9494

@@ -189,3 +189,9 @@ The internal queries that are ran before the queries in ```initSQLString``` are
189189
Default: process.arch
190190

191191
Description: The MySQL binary architecture to execute. MySQL does not offer server builds for Windows on ARM, so to get this package working on Windows on ARM, set the arch option to "x64" and Windows will emulate MySQL.
192+
193+
- `xEnabled: "OFF" | "ON" | "FORCE"`
194+
195+
Default: "FORCE"
196+
197+
Description: This option follows the convention set out by the [MySQL Documentation](https://dev.mysql.com/doc/refman/en/plugin-loading.html). If set to "OFF", the MySQL X Plugin will not initialise. If set to "ON", the MySQL X Plugin will try to initialise, but if the initialisation process fails, the MySQL Server will continue the startup process with the plugin disabled. If set to "FORCE", the MySQL Server will not start up without a successful initialisation of the plugin. With this option set to "FORCE", the server will either start up with the plugin enabled, or the server will fail to start up.

0 commit comments

Comments
 (0)