Reset MySQL Root Password

$ sudo /etc/init.d/mysql stop
$ sudo mysqld_safe –skip-grant-tables &
$ mysql -u root

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

$ sudo /etc/init.d/mysql stop
$sudo /etc/init.d/mysql start
$ mysql -u root -p

#/etc/init.d/mysql stop # mysqld_safe --skip-grant-tables &$ mysql -u root mysql>use mysql; mysql>updateuserset password=PASSWORD("YOUR-NEW-ROOT-PASSWORD")whereUser='root'; mysql> flush privileges; mysql> quit #/etc/init.d/mysql stop #/etc/init.d/mysql start$ mysql -u root -p
Advertisements