En caso que no recuerde el password de MySQL con xampp el procedimiento es:
Bajar el servicio de lampp
root@jmanuel:/opt/lampp/bin# /opt/lampp/lampp stop
Iniciar la base de datos en modo skip-grant-tables
root@jmanuel:/opt/lampp# /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --skip-grant-tables &
Ingresar a la base de datos
Es importante estar ubicado en la ruta /opt/lampp/bin o ejecutar el mysql con el path completo
root@jmanuel:/opt/lampp/bin# ./mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.16 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Ingreso a la bd mysql
mysql> use mysql;
Database changed
Actualizacion del password
mysql> update user set password=PASSWORD("password") where User='root';
Query OK, 2 rows affected (0,15 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0,02 sec)
mysql> quit
Bye
Matar los proceso de mysqld_safe
root@jmanuel:/opt/lampp/bin# ps xa | grep mysql
15037 pts/0 S+ 0:00 /bin/sh /opt/lampp/bin/mysqld_safe --datadir=/opt/lampp/var/mysql --pid-file=/tmp/mysqld.pid --skip-grant-tables
15685 pts/0 Sl+ 0:00 /opt/lampp/sbin/mysqld --basedir=/opt/lampp --datadir=/opt/lampp/var/mysql --plugin-dir=/opt/lampp/lib/mysql/plugin --user=nobody --skip-grant-tables --log-error=/opt/lampp/var/mysql/jmanuel.err --pid-file=/tmp/mysqld.pid --socket=/opt/lampp/var/mysql/mysql.sock --port=3306
root@jmanuel:/opt/lampp/bin# kill -9 15037 15685
Por ultimo iniciar nuevamente el lampp y probar
root@jmanuel:/opt/lampp/bin# /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
root@jmanuel:/opt/lampp/bin# ./mysqlshow -uroot -ppassword
+--------------------+
| Databases |
+--------------------+
| information_schema |
| cdcol |
| mysql |
| performance_schema |
| phpmyadmin |
| test |
| vtigetr |
+--------------------+
muchas gracias
ResponderEliminarUno de los elementos que hace seguro a Ubuntu y a todo unix en general es su sistema de usuarios y permisos por el cual el sistema se protege de amenazas y ayuda a recuperar contraseña gmail como virus entre otras cosas sin embargo que pasaría si olvidamos la contraseña para inicio de sesión en Ubuntu?, pues bien ese es el tema de este tutorial en el cual les voy a enseñar paso a paso como recuperar una contraseña perdida u olvidada en este sistema operativo.
ResponderEliminar