- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Description
The MySQL downloads follow a pattern so it will be easy to allow downloads for all supported versions and platforms of mysql-memory-server.
Currently there is a versions.json file which stores the version, url, OS, arch, version of OS supported for each version of MySQL that can be downloaded through mysql-memory-server. This package supports running MySQL >= 5.7.19 <= 9.2.0 but only downloading 8.0.39 - 8.0.41, 8.1.0 - 8.3.0, 8.4.2 - 8.4.4, and 9.0.1 - 9.2.0.
The pattern for the download file names are as follows (at least for the supported versions, >= 5.7.19 <= 9.2.0):
Windows: mysql-{version}-winx64.zip
Linux: mysql-{version}-linux-glibc{glibc version}-{arch}.tar.xz
macOS: mysql-{version}-macos{macOS version}-{arch}.tar.gz
glibc version and macOS version differs between MySQL versions. An object with keys being version ranges and values being macOS/glibc versions can be used to get the file names for each version download.
We could also store the OS versions and arches that are supported by MySQL with version ranges so we can still alert the user when the selected MySQL version is not supported on their system. The versions.json file is almost 500 lines long with very few versions being able to be downloaded so these small checks would still make a massive reduction in file size and lines.
For the download URLs, they are as follows:
https://cdn.mysql.com//Downloads/MySQL-{majorVersion}.{minorVersion}/{file name - look above for file name}