Sample Header Ad - 728x90

Powershell script while executing mysqldump script

0 votes
1 answer
403 views
I'm having an error 1045: Access denied for user 'mysqlsuperuser'@'test.internal.cloudapp.net' (using password: YES) when trying to connect Here is the mysqldump command on my ps1 file. $command = [string]::format(""{0}" -u {1} -p{2} -h {3} --default-character-set=utf8mb4 --quick --master-data=2 --single-transaction --routines --databases test1 --add-drop-database --result-file="{5}" ", $mysqlDumpLocation, $databaseUsername, $databasePassword, $databaseIp, $database.DatabaseName, $saveFilePath); But when I try to remove the {2} which is the DB password, then execute the ps1 file. When it prompt me for the password, it goes through.
Asked by JRA (137 rep)
Jan 27, 2021, 10:57 AM
Last activity: May 31, 2025, 10:03 AM