File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
.github/actions/setup-windows Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 55 - name : Setup MySQL
66 shell : pwsh
77 run : |
8- choco install mysql -y --no-progress --params="/port:3306"
8+ try {
9+ # Try installing MySQL from default choco
10+ choco install mysql -y --no-progress --params="/port:3306"
11+ } catch {
12+ Write-Host "Default MySQL installation failed (dev.mysql.com rate-limiting?). Trying backup location..."
13+ $backupUrl = "https://github.com/divinity76/php-src/releases/download/mysql-8.0.31-winx64.zip/mysql-8.0.31-winx64.zip"
14+ $destination = "C:\tools\mysql-8.0.31-winx64.zip"
15+ Invoke-WebRequest -Uri $backupUrl -OutFile $destination
16+ # Extract and install MySQL manually
17+ Expand-Archive -Path $destination -DestinationPath "C:\tools\mysql"
18+ Write-Host "MySQL extracted to C:\tools\mysql"
19+ # Add MySQL to PATH
20+ $env:Path += ";C:\tools\mysql\bin"
21+ }
922 mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
1023 - name : Setup MSSQL
1124 shell : pwsh
You can’t perform that action at this time.
0 commit comments