Q:

Ubuntu 16.04 Mysql update broke root login

After regular update mysql stop me from login I had root user with no password for local host. 
|  innodb_version          | 5.7.15                  |

| protocol_version        | 10                      |

| tls_version             | TLSv1,TLSv1.1           |

| version                 | 5.7.15-0ubuntu0.16.04.1

I can log in into server with 
 mysqld_safe --skip-grant-tables &

but got error
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'test';
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded

How to change actually password for root??

A:

Do a 
cat /etc/mysql/debian.cnf on your terminal.
The file contents displayed should contain username and password of 2 users.
Use any of these credentials to access your mysql.
Change root password on the mysql prompt.
run flush privileges;
Now exit the MySQL pront and try logging in as root, it should work.

