Error Instalando mysql-server

Este es el error que se presenta: 

  Setting up mysql-server-8.0 (8.0.32-0ubuntu0.22.10.2) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2023-03-17T17:42:33.732349Z 0 [ERROR] [MY-011065] [Server] Unable to determine if daemon is running: Invalid argument (rc=0).
2023-03-17T17:42:33.733195Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Job for mysql.service failed.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: oom-kill) since Fri 2023-03-17 17:42:36 UTC; 52ms ago
    Process: 2883 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 2891 ExecStart=/usr/sbin/mysqld (code=killed, signal=KILL)
   Main PID: 2891 (code=killed, signal=KILL)
     Status: "Server startup in progress"
        CPU: 624ms
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Setting up libcgi-pm-perl (4.54-1) ...
Setting up libhtml-template-perl (2.97-2) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up libcgi-fast-perl (1:2.15-1) ...
Processing triggers for man-db (2.10.2-2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
              Processing triggers for libc-bin (2.36-0ubuntu4) ...
Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

 La solución, ejecutar estos comandos:

  1. sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
  2. sudo rm -r /etc/mysql /var/lib/mysql
  3. sudo apt autoremove && sudo apt autoclean && sudo apt-get dist-upgrade
  4. sudo reboot
  5. sudo apt install mysql-server

0 comments:

Post a Comment