Como estan las cabezas son tantos los tecnicos de soporte que no hacen bien las cosas que te toca rectificar su trabajo, bueno el caso que tenemos un servidor Mysql que no se sabe la password asi que desde un shell de linux y como root vamos a recuperarla.

 

Primero paramos el servidor de MySQL

root@ubuntu:/var/log/samba# /etc/init.d/mysql stop

 

Ahora iniciamos modo seguro el mysql con con la opcion mysqld_safe

 

root@ubuntu:/var/log/samba# mysqld_safe –skip-grant-tables
110328 11:29:53 mysqld_safe Logging to syslog.
110328 11:29:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Ahora me abro otra ventana y ejecuto

mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.37-1ubuntu5.5 (Ubuntu)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> update user set Password =PASSWORD (‘contraseñas’) where user= ‘root’;
Query OK, 3 rows affected (0,00 sec)
Rows matched: 3  Changed: 3  Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0,00 sec)

mysql> exit
Bye

 

Y ahora arranca MySQL de forma normal.

 

root@ubuntu:/var/log/samba# /etc/init.d/mysql restart
* Stopping MySQL database server mysqld                                                                                                                                 [ OK ]
* Starting MySQL database server mysqld                                                                                                                                 [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

Por admin

Deja una respuesta

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO