How to reset root password?

QuestionsQuestions8 SkillsProBasic Files OperationsNov, 27 2025
074

To reset the root password for MySQL, you can follow these steps:

  1. Open a terminal.

  2. Run the following command to reset the root password to labex:

    sudo mysqladmin -u root password labex
  3. After executing the command, you can log in to the MySQL database using:

    mysql -u root -plabex

This will set the root password to labex, allowing you to log in to the MySQL database with that password.

0 Comments

no data
Be the first to share your comment!