How can I login to MySQL as or ::1 instead of localhost?

I’ve set different password for 'root'@'localhost' and 'root'@'127.0.01' like this:

mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('pswd1');
SET PASSWORD FOR 'root'@'' = PASSWORD('pswd2');

but when I try to login like this:

mysql -u root -p -h

I still have to use the first password pswd1 even though according to this:

enter image description here

another password pswd2 was set for

What is the problem here? How can I set 3 different passwords for ‘root’@’localhost’, ‘root’@’’ and ‘root’@’::1′ and login to those accounts with those passwords?

Go to Source
Author: JConstantine

Unexpected SPC Access Width error returning to default e

What’s happened: I have modified the fstab file. My aim was to mount an external hard disk permanently. I duly changed the username, but forgot to change the “sdb4″ to sdb1” in the command line and pasted it to a terminal window. Now Ubuntu does not boot, I am on a choo-choo train or loop, and I have forgotten the root password. This afternoon I created a boot repair usb stick, but this does not work either. F6 key does not work and I cannot choose the “no mode set”. I fear I might well have to delete the Ubuntu partition (I am on dual boot: windows 7 /Ubuntu 18.4) and try a fresh install, thus losing some data….

Go to Source
Author: Christophe Naud