• home
  • forum
  • my
  • kt
  • download
  • Reset MySQL root password

    Author: 2009-03-16 09:11:37 From:

    As a database administrator, you might forget the root password for your database. It is a serious problem. This tutorial is to teach you how to reset the root password if you forget it.

    1. Stop the MySQL service.

      /etc/init.d/mysql stop

    2. Start the MySQL in the save mode.

      mysqld_safe –skip-grant-tables &

    3. Login into MySQL as root user

      mysql -u root

    4. Update the root user password.

      mysql> use mysql;
      mysql> update user set password=PASSWORD(”NEW PASSWORD”) where user=’root’;
      mysql> flush privileges;
      mysql> quit;

    5. Restart the MySQL service & try to login using the new password.

      /etc/init.d/mysql stop
      /etc/init.d/mysql start

      mysql -u root -p

    discuss this topic to forum

    relation tutorial

    No information

    Category

      Miscellaneous (22)

    New

    Hot