MySQL root password recovery

9:50 pm in MySQL by emran

To recover root or administrative password on MYSQL please follow the bellow instructions.

# killall mysqld
# /usr/sbin/mysqld –skip-grant-tables –user=root &

mysql> USE mysql
mysql> update user set password=password(“YOUSETPASSWORD”) Where user=”root”;

mysql> flush privileges;
mysql> exit

# killall mysqld
# /etc/init.d/mysql start

# mysql -u root -p (Now Login with the new root password)