Copiar y pegar: recuperar password de root de mysql en linux

Copia y pega para recuperar la contraseña de root de mysql

newpassword="2";
/etc/init.d/mysql stop
/usr/bin/mysqld_safe --skip-grant-tables --user=root &
sleep 5
mysql -u root mysql -e "update user set password=PASSWORD('$newpassword') where user='root'; flush privileges; ";
/etc/init.d/mysql restart

You have already tagged this post. Your tags:

Noticia original: Hosting Al Descubierto

Valid XHTML 1.0 Strict