Skip to content

Commit

Permalink
refs
Browse files Browse the repository at this point in the history
  • Loading branch information
abdotaskies committed Aug 24, 2024
1 parent f53f65e commit 31dfcaf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mysql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ if ($existing -eq $false) {
nerdctl exec -i mysql bash -c @"
mysql -h localhost -P 3306 -u root -p$mysql_root_password <<< "show databases;"
"@
Write-Host "New MySQL user $new_user created successfully."
if ($_ -ne 0) {
Write-Error "Failed to connect to MySQL server. Exiting..."
exit 1
}
else {

Write-Host "New MySQL user $new_user created successfully."
}
}

Write-Host "MySQL setup script completed."

0 comments on commit 31dfcaf

Please sign in to comment.