In Linux Debian/Ubuntu an extra user debian-sys-maint which also has all the access rights is used for maintenance. It can also be used to reset users passwords especially the root password when lost. Here are some tips regarding resetting them.
Resetting the ‘root’ password
mysqladmin -u root -p password "MyNewPass"
mysql -u debian-sys-maint -p
update mysql.user set Password=password('MyNewPass') where User='root';
Resetting/creating the user and giving it all the access rights.
mysql -u root -p
create user 'debian-sys-maint'@'localhost' identified by 'UserPassword';
grant all privileges on *.* to 'debian-sys-maint'@'localhost'