Just run the below commands
- Command to access MySQL as the root usersudo mysql # or sudo mysql -u root
- Replace ‘yourpassword’ below with the password you want to useALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘yourpassword’;