Sunday, May 6, 2012

Mysql: Reset your mysql root password

  1. Stop mysql first
    #/usl/local/etc/rc.d/mysql-server stop.
    #mysqld_safe --skip-grant-tables

  2. Than open new shell and go to the mysql-server
    #mysql --user=root mysql

  3. Now you enter the mysql server and run this command
    #update user set Password=PASSWORD('new-password') where user='root';

    #flush privileges;

    #exit;


  4. Start the server
    #/usl/local/etc/rc.d/mysql-server start


  5. Done

0 comments:

Post a Comment