When a connection is made to a database with (1) a non-existent user, (2) an empty password, and (3) the database allows access for the user with an empty name, the error message changes from 1045 to 1044 and is missing the username.
Reproducible on Windows and Linux.
This leads to a lot of wasted time and confusion regarding the username setting.
Without the user ''@'localhost':
Then add the user ''@'localhost' with no DB access rights: