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 5
5
- name : Setup MySQL
6
6
shell : pwsh
7
7
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
+ }
9
22
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
10
23
- name : Setup MSSQL
11
24
shell : pwsh
You can’t perform that action at this time.
0 commit comments