I want to run MySQL commands from terminal. But getting the following error.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
On 1st time I change my
root@localhost password and created another user
hello@ localhost with all privileges. But after that couldn't login again. I used
mysql -h during 1st setup.
These commands are causing the above error.
sudo mysql -u root; sudo mysql -u hello; sudo mysql -h localhost mysql; sudo mysql -h localhost hello;
Note that I know my current passwords and want to change them.