Skip to content

Commit 8eaea9a

Browse files
add support for MySQL >=8.0.11 (#176)
1 parent 5af9a03 commit 8eaea9a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Requirements for Linux:
2727

2828
#### Currently supported MySQL versions
2929

30-
- If using the system installed MySQL server: 8.0.20 and newer
30+
- If using the system installed MySQL server: 8.0.11 and newer
3131
- If not using the system installed MySQL server: 8.0.39, 8.0.40, 8.1.0, 8.2.0, 8.3.0, 8.4.2, 8.4.3, 9.0.1, 9.1.0
3232

3333
## Example Usage - Application Code
@@ -112,11 +112,11 @@ Default: undefined
112112
Description: Version of MySQL to use for the database. Uses semver for getting the version, so valid semver versions are allowed. For example, `8.x` is a valid version and will use the latest 8.x MySQL version.
113113

114114
If left undefined:
115-
- If the system has MySQL installed, the system-installed version will be used. If the installed version is not supported by this package (currently <8.0.20), an error will be thrown unless `ignoreUnsupportedSystemVersion` is set to `true`.
115+
- If the system has MySQL installed, the system-installed version will be used. If the installed version is not supported by this package (currently <8.0.11), an error will be thrown unless `ignoreUnsupportedSystemVersion` is set to `true`.
116116
- If the system does not have MySQL installed, the latest version of MySQL in the `versions.json` file in this package will be downloaded.
117117

118118
If defined:
119-
- If the version is 8.0.19 or older, an error will be thrown as this package does not currently support those versions of MySQL.
119+
- If the version is older than 8.0.11, an error will be thrown as this package does not currently support those versions of MySQL.
120120
- If the desired version of MySQL is installed on the system, the installed version will be used. Otherwise the selected version will be downloaded from the MySQL CDN as long as it can be found in the `versions.json` file. If it cannot be found in that file, an error will be thrown.
121121

122122
- `dbName: string`
@@ -179,7 +179,7 @@ Description: The port that the MySQL X Plugin will listen on. If set to 0, a ran
179179

180180
Default: false
181181

182-
Description: This option only applies if the system-installed MySQL version is lower than the oldest supported MySQL version for this package (8.0.20) and the `version` option is not defined. If set to `true`, this package will use the latest version of MySQL instead of the system-installed version. If `false`, the package will throw an error.
182+
Description: This option only applies if the system-installed MySQL version is lower than the oldest supported MySQL version for this package (8.0.11) and the `version` option is not defined. If set to `true`, this package will use the latest version of MySQL instead of the system-installed version. If `false`, the package will throw an error.
183183

184184
- `downloadRetries: number`
185185

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {normalize as normalizePath} from 'path'
44
import { tmpdir } from "os";
55
import { valid as validSemver, coerce as coerceSemver } from "semver";
66

7-
export const MIN_SUPPORTED_MYSQL = '8.0.20';
7+
export const MIN_SUPPORTED_MYSQL = '8.0.11';
88

99
export const DEFAULT_OPTIONS_GENERATOR: () => InternalServerOptions = () => ({
1010
version: undefined,

src/libraries/Executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class Executor {
302302
stderr = result?.stderr
303303
}
304304

305-
if (stderr && !stderr.includes('InnoDB initialization has ended')) {
305+
if (stderr && !stderr.includes('is created with an empty password')) {
306306
if (process.platform === 'win32' && stderr.includes('Command failed')) {
307307
this.logger.error(stderr)
308308
throw 'The mysqld command failed to run. A possible cause is that the Microsoft Visual C++ Redistributable Package is not installed. MySQL 5.7.40 and newer requires Microsoft Visual C++ Redistributable Package 2019 to be installed. Check the MySQL docs for Microsoft Visual C++ requirements for other MySQL versions. If you are sure you have this installed, check the error message in the console for more details.'

0 commit comments

Comments
 (0)