点击浏览器下载MySQL安装包比较繁琐,这里使用batch脚本加速下载。
新建脚本可以参考conda安装
具体脚本内容
@echo off
where mysql >nul 2>nul
if %errorlevel% neq 0 (
echo "MySQL is not installed."
echo "Downloading MySQL installer..."
rem 替换下面的链接为 mysql 安装包的下载链接
set downloadLink="https://cdn.mysql.com//Downloads/MySQL-8.3/mysql-8.3.0-winx64.msi"
powershell -Command "Invoke-WebRequest -Uri %downloadLink% -OutFile MySQLInstaller.msi"
echo "MySQL installer has been downloaded. Please install it manually."
start MySQLInstaller.msi
) else (
echo "MySQL is already installed"
)
pause