mysql -uroot ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql -uroot -p Enter password: <-- leave blank, hit enter without entering anything mysql> <-- i am logged in
NOTE: This is a new mysql instance installation
So if the password is blank, why won't it log me in without a -p flag?
For a little clarification. I am running into this issue when attempting to change the password using a script:
We're using a bash script to do that.
mysqladmin -u root password abcwouldn't work (access denied)
mysqladmin -u root -p password abccannot be used because it prompts for a password and we need to automate this.
mysqladmin -u root -p'' password abcis not working either