This is a tricky one, I have the following output:
mysqldump: Got error: 1045: Access denied for user \'root\'@\'localhost\' (using password: YES) when tr
Tried most of the above with no joy. Looking at my password, it had characters that might confuse a parser. I wrapped the password in quotes and the error was resolved. -p"a:@#$%^&+6>&FAEH"
Using 8.0