0

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 Jan 27, 2021 at 10:57

1 Answer 1

0

I would guess that there's one or more characters in the password that are "confusing" the shell.

There are standard techniques for supplying passwords to mysql utilities that avoids having to have them coded into scripts or visible to any process list run on the machine. See this answer.

answered Jan 27, 2021 at 11:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.