Skip to content

Commit

Permalink
refs
Browse files Browse the repository at this point in the history
  • Loading branch information
abdotaskies committed Aug 25, 2024
1 parent e193775 commit d43cd0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mysql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ if ($existing -eq $false) {
}
Write-Host "Creating new MySQL user $new_user..."
$query = "CREATE USER '$new_user'@'%' IDENTIFIED WITH mysql_native_password BY '$new_password';GRANT ALL PRIVILEGES ON *.* TO '$new_user'@'%';FLUSH PRIVILEGES;"
$command = "nerdctl exec mysql mysql -u root -p$mysql_root_password -e `"$query`""
$command = "sudo nerdctl exec mysql mysql -u root -p$mysql_root_password -e `"$query`""
# wait for the command to finish
$command += " && wait"
# fill content of file in bash and execute
$file = "mysql-new-user.sh"
if(Test-Path $file) {
Expand Down

0 comments on commit d43cd0c

Please sign in to comment.