lunes, 23 de octubre de 2023

recover mysql

 

  1. Bind Mount Essential Directories: Bind mount essential directories from the live system to the corresponding directories inside your mounted root directory.

    bash
    mount --bind /dev /mnt/dev mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys
  2. Chroot into the Mounted System: Change the root to the mounted directory.

    bash
    chroot /mnt
  3. Create Missing Directories (if necessary): If MySQL is complaining about missing directories such as /var/run/mysqld, create them manually.

    bash
    mkdir -p /var/run/mysqld
sudo su -u mysql mysqld --defaults-file=/etc/my.cnf &

No hay comentarios:

Publicar un comentario