Please follow the below steps.
sudo service mysql stop
sudo mysqld_safe –skip-grant-tables
sudo service mysql start
sudo mysql -u root
use mysql;
show tables;
describe user;
update user set authentication_string=password(‘1111′) where user=’root’;
FLUSH PRIVILEGES;
mysql_secure_installation if pass root is null
Nice article thank you for sharing