Monday, April 5, 2010

To reset MySQL root password

    Start the mysql in safe mode and do the update query.

        /etc/init.d/mysql stop;
        mysqld --skip-grant-tables --skip-networking &;
        mysql mysql -u root;
        UPDATE user SET password=PASSWORD('root321') WHERE user="root";
        /etc/init.d/mysql restart;

    Ref : http://en.kioskea.net/faq/630-reinitializing-the-root-password-of-mysql

No comments:

Post a Comment