Feeds, issues, packages and code source about emulation and pograming, of VENENUX proyects, Debian related distros and massenkoh!

Recover root MYSQL/MARIADB/PERCONA password

For spanish version see the VenenuX Sarisariñama group mail. https://groups.google.com/forum/m/#!topic/venenuxsarisari/J-UtNe59Dn0:

Quickly, this permit restart the root password for mysql based (MariaDB, Percona, MySQL) DBMS, in 4 steps:

Step 1, stop the service for works with it:
$>/etc/init.d/mysql stop

Step 2, give up but without complete environment and sistems controls:
$>/usr/bin/mysql_safe –skip-grant-tables&

Step 3, start now the mysql console, password will not ask anymore (for now):
Iniciar una consola sin contraseña (no hace falta)
$>mysql -u root

Step 4, restart the password in the master users table to set the new root passowrd:
sql> update user set password = password(’aqui la clave’) where user = ‘root’ ;

Now exit and u can now restart the DBMS and have a new root password;
/etc/init.d/mysql stop
/etc/init.d/mysql start

Was tested with MariaDB 5.3 and works perfectly, due Percona Server are a MySQL enterprise open source, can assume that will work.

Tomado del blog de Samel Paez.

0 comments/comentarios:

Publicar un comentario

si vienes de guindo, winbuntu o parecido, limitate y escribe algo util...