Así que hoy instalé MariaDB para poder iniciar sesión a través de phpmyadmin, aparentemente no funcionó, así que lo eliminé, lo intenté nuevamente cuatro veces y fallé. Decidí ir con MySQL Server en su lugar. No pude instalarlo después de eliminar MariaDB.
Esto es lo que estoy tratando de hacer y los resultados:
shavit@dedi:~$ sudo apt-get install mysql-server
[sudo] password for shavit:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.12-0ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
mysql_upgrade: Got error: 1524: Plugin 'unix_socket' is not loaded while connect ing to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--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.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up er ror from a previous failure.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
shavit@dedi:~$ sudo apt-get remove mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libaio1 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7
mysql-server-core-5.7
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
mysql-server
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 159 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 35749 files and directories currently installed.)
Removing mysql-server (5.7.12-0ubuntu1) ...
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
mysql_upgrade: Got error: 1524: Plugin 'unix_socket' is not loaded while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
Estoy realmente perdido en este momento ... Google me dijo que debería correr, apt-get install -f
pero eso es lo que obtengo:
shavit@dedi:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
mysql_upgrade: Got error: 1524: Plugin 'unix_socket' is not loaded while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
No apport report written because the error message indicates it's a follow-up error from a previous failure.
dpkg: error processing package mysql-server-5.7 (--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.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Así que corrí sudo apt-get autoremove
y procedo a instalar nuevamente:
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu3) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Soy un novato con todo lo relacionado con Linux y especialmente con Ubuntu. ¿Alguien podría echarme la mano y ayudarme? ¡Muy apreciado!
Respuestas:
Creo que el hecho de que tengas instalado MariaDB causó este problema. Las configuraciones que MariaDB configuró no funcionan exactamente bien con MySQL de Vanilla. Si tuviera que purgar todas las configuraciones antiguas y configurar todo desde cero, debería funcionar. Tenga en cuenta que esto eliminará sus DB actuales. Haga una copia de seguridad de los datos importantes.
Intente ejecutar el siguiente comando para restablecer y purgar todas las cosas relacionadas con MySQL:
Una vez hecho esto, ejecute lo siguiente para actualizar su sistema y "limpiar" la caché de su paquete.
Luego, intente volver a instalar MySQL Server:
fuente
dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed
¿debería eliminarlo/etc/mysql
?sudo mysql_secure_installation
, funcionó cuando tenía MariaDB. ¿Tienes alguna idea de lo que podría estar mal?Este error puede ocurrir cuando instala
mariadb-server
antesmysql-server
. Para resolver este error, debe eliminar los directorios/var/lib/mysql*
y/etc/mysql*
eliminar todas las configuraciones y archivos de dependencias, antes de intentar instalar MySQL nuevamente.fuente