This kind of error occurs when we use a faulty username in the command. You should provide the same username your MySql supports. You can use this command and check, I hope it will work:
mysql -u root -p
One note point: If you try to change the username, it may take another command to configure it. So better if your user name is root, do not change if you don't want to face complications.