Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,34 @@ function Install-MySqlServer

if( -not (Get-Service -Name $serviceName -ErrorAction SilentlyContinue))
{
if($MySqlVersion -eq "5.6" -or $MySqlVersion -eq "5.5" -or $MySqlVersion -eq "5.7")
if($MySqlVersion -eq "5.6" -or $MySqlVersion -eq "5.5" -or $MySqlVersion -eq "5.7" -or $MySqlVersion -eq "8.0")
{
if ($MySqlVersion -eq "5.7")
{
if ($MySqlVersion -eq "8.0") {
if (!(Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%Visual C++ 2015%'")) {
# MySQL 8.0 Server requires the Microsoft Visual C++ 2015 Redistributable Package to run on Windows platforms.
# https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html
Write-Verbose -Message "Download Visual C++ 2015 Redistributable"
$vcRuntimes = @(
@{
"FileName"="vc_redist.x64.exe"
"FileUri"="https://aka.ms/vs/16/release/vc_redist.x64.exe"
}
)

foreach ($vcRuntime in $vcRuntimes) {
$vcRuntimeUri = $vcRuntime.FileUri
Download-Package $vcRuntimeUri
$vcRuntimeFile = (Join-Path "$PSScriptRoot" $vcRuntime.FileName)
Write-Verbose -Message "Install Visual C++ 2015 Redistributable, $($vcRuntime.FileName)"
Start-Process -File $vcRuntimeFile -ArgumentList "/install /quiet /passive /norestart /log $env:SystemDrive\Logs\vc_$($vcRuntime.FileName).log" -Wait
}
} else {
Write-Verbose -Verbose -Message "Microsoft Visual C++ 2015 Redistributable is installed"
Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%Visual C++ 2015%'"
}
}
if ($MySqlVersion -eq "5.7" -or $MySqlVersion -eq "8.0")
{
# Initialize the data folder
if(-not (Test-Path (Join-Path $Destination "data")))
{
Expand Down
8 changes: 5 additions & 3 deletions mysql-standalone-server-windows/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@
},
"mySqlVersion": {
"type": "string",
"defaultValue": "5.7",
"defaultValue": "8.0",
"allowedValues": [
"5.5",
"5.6",
"5.7"
"5.7",
"8.0"
],
"metadata": {
"description": "MySql Version"
Expand Down Expand Up @@ -96,10 +97,11 @@
"imageOffer": "WindowsServer",
"dnsNameForPublicIP": "[tolower(parameters('vmName'))]",
"OSDiskName": "[concat('osdisk-', parameters('vmName'))]",
"assetLocation": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/mysql-standalone-server-windows/",
"assetLocation": "https://raw.githubusercontent.com/msftcoderdjw/AzureStack-QuickStart-Templates/staging/mysql-standalone-server-windows/",
"cseBlobNameScript": "MySql.Setup.CustomScriptExtension.ps1",

"mySqlInstallationZipPath": {
"8.0": "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.22-winx64.zip",
"5.7": "https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.17-winx64.zip",
"5.6": "https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.35-winx64.zip",
"5.5": "https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.54-winx64.zip"
Expand Down