diff --git a/src/main/services/MySqlManagerService.ts b/src/main/services/MySqlManagerService.ts index 693b4e7..f21c27f 100644 --- a/src/main/services/MySqlManagerService.ts +++ b/src/main/services/MySqlManagerService.ts @@ -19,10 +19,8 @@ export class MySqlManagerService { constructor() { this.binDir = path.join(app.getPath('userData'), 'bin') - // In development, it's in src/main/resources, but we should handle both this.catalogPath = path.join(app.getAppPath(), 'src/main/resources/mysql_catalog.json') if (!fs.existsSync(this.catalogPath)) { - // Fallback for production or different root this.catalogPath = path.join(process.cwd(), 'src/main/resources/mysql_catalog.json') } this.init() @@ -49,8 +47,13 @@ export class MySqlManagerService { const dynamicVersions: MySqlVersion[] = releases.map(v => { const version = v.version const cycle = v.series - // Pattern: https://downloads.mysql.com/archives/get/p/23/file/mysql-VERSION-winx64.zip - const url = `https://downloads.mysql.com/archives/get/p/23/file/mysql-${version}-winx64.zip` + + // Extract MAJOR.MINOR (e.g. 8.0 from 8.0.40) + const versionParts = version.split('.') + const majorMinor = `${versionParts[0]}.${versionParts[1]}` + + // Working CDN Pattern: https://cdn.mysql.com/archives/mysql-MAJOR.MINOR/mysql-VERSION-winx64.zip + const url = `https://cdn.mysql.com/archives/mysql-${majorMinor}/mysql-${version}-winx64.zip` return { id: `mysql-${version}`,