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??
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.For me the solution of Ayush didn´t work. When using the credentials defined in
/etc/mysql/debian.cnf
I got the error:Instead it worked with a solution presented here:
I logged in with
and on the mysql prompt I entered
Afterwards I could log in to MySQL the normal way.