Se rompió una actualización de software, entre otras cosas, mysql y aún no he podido recuperarla.
Causa sospechada: tenía un disco de arranque casi lleno; la actualización llenó el disco antes de completar y, por lo tanto, dejó todo en un desastre. Le di al sistema más disco y moví / var a su propia partición. Todavía estoy intentando sin éxito revivir mysql.
A continuación se muestra lo que intenté hasta ahora (todo como root). Primero, mysql no se inicia (443). Los intentos de arreglar (444, 445) fallan. Los intentos de eliminar mysql y (?) Apparmor fallan (446, 7, 8). Un intento más enérgico de eliminar mysql parece tener éxito (449) y los errores anteriores ya no se ven (450, 1, 2). Mysql no se puede reconfigurar porque ya no está allí (453) pero al intentar reinstalarlo se devuelven los viejos mensajes de error y volvemos al punto de partida (454).
También revisé esta pregunta (aunque en mi caso no se rompió debido a una actualización a 12.04: ya estaba funcionando en 12.10) Arreglando el paquete myslq-server roto después de la actualización a 12.04 e intenté las sugerencias allí (458, 461, 462) en vano.
¿Que más deberia hacer?
Esto está en 3.5.0-25-generic # 39-Ubuntu SMP Lun 25 de febrero 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU / Linux
443 service mysql start
start: Job failed to start
444 dpkg-reconfigure mysql-server-5.5
/usr/sbin/dpkg-reconfigure: mysql-server-5.5
is broken or not fully installed
445 apt-get -f install
...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
dpkg: dependency problems prevent configuration of
mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message
indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
446 apt-get remove mysql-server
...
Removing mysql-server ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
447 apt-get remove apparmor
...
Package 'apparmor' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
448 apt-get remove mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
449 dpkg -r mysql-server-5.5
(Reading database ... 322156 files and directories
currently installed.)
Removing mysql-server-5.5 ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
450 apt-get remove mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mysql-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
451 apt-get remove apparmor
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'apparmor' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
452 apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
453 dpkg-reconfigure mysql-server-5.5
/usr/sbin/dpkg-reconfigure: mysql-server-5.5 is broken
or not fully installed
454 apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.5
Suggested packages:
tinyca mailx
The following NEW packages will be installed:
mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/8,851 kB of archives.
After this operation, 32.8 MB of additional disk space
will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 322081 files and directories
currently installed.)
Unpacking mysql-server-5.5 (from
.../mysql-server-5.5_5.5.29-0ubuntu0.12.10.1_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from
.../mysql-server_5.5.29-0ubuntu0.12.10.1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message
indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
458 apt-get remove --purge mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 116 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 322159 files and directories
currently installed.)
Removing mysql-server ...
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script
returned error exit status 1
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
461 touch /etc/apparmor.d/local/usr.sbin.mysqld
(no output)
462 service mysql start
start: Job failed to start
--purge
no es necesariamente lo que uno quiere, ya que también eliminará los archivos de configuración. En el caso de mysql específicamente, me pregunto si también eliminaría el dbs./etc/mysql
y/var/lib/mysql
.En Ubuntu 16.04, la forma de solucionarlo en mi caso fue ( primero haga una copia de seguridad de las bases de datos, se perderán las bases de datos ):
(De alguna manera, mis llamadas anteriores
apt purge mysql-server
no parecieron tener éxito. Pensé que esoapt purge foo
era equivalente aapt remove --purge foo
...)fuente
Estaba recibiendo exactamente los mismos errores e intenté la mayoría de los pasos que hiciste, con los mismos resultados. Lo siguiente finalmente funcionó para mí.
Después de eso, mysql se instaló normalmente.
fuente
No estoy seguro de cuál fue el caso para mí, pero las otras soluciones no funcionaron, seguía dando un error. Intenté esto
apt-get purge mysql-*
, entoncesautoremove
yautoclean
. Después de eso la instalación estuvo bien.** **
Asegúrese de hacer una copia de seguridad de sus bases de datos, el comando anterior también podría eliminarlas
** **
fuente
Si solo corres
actualizará mysql y esto solucionó el problema que tuve después de actualizar a 16.04 lts.
O simplemente corre
para actualizar todos los paquetes del servidor.
fuente
Para la versión MySQL 5.7 eliminé MySQL como se describió anteriormente:
Y lo instalé con ayuda:
Para probar si todo funciona:
fuente
fuente
Instale phpMyAdmin desde los repositorios predeterminados de Ubuntu. Entonces corre:
fuente