Problemas na instalação do servidor MySQL

3

Estou tendo problemas para instalar o mysql e / ou o mariadb.

Estou recebendo o seguinte:

sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-common
  mysql-server-5.5
Suggested packages:
  tinyca
The following NEW packages will be installed:
  libdbd-mysql-perl libmysqlclient18 mysql-client-5.5 mysql-common
  mysql-server mysql-server-5.5
0 upgraded, 6 newly installed, 0 to remove and 7 not upgraded.
Need to get 0 B/4,164 kB of archives.
After this operation, 67.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 104782 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package mysql-client-5.5.
Preparing to unpack .../mysql-client-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 104875 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.46-0ubuntu0.14.04.2_amd64.deb ...
Unpacking mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.46-0ubuntu0.14.04.2_all.deb ...
Unpacking mysql-server (5.5.46-0ubuntu0.14.04.2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libmysqlclient18:amd64 (5.5.46-0ubuntu0.14.04.2) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up mysql-client-5.5 (5.5.46-0ubuntu0.14.04.2) ...
Setting up mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package 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 package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
E: Sub-process /usr/bin/dpkg returned an error code (1)

Exatamente o mesmo problema / mensagem de erro com o servidor mariadb também.

coisas que eu tentei:

sudo dpkg --configure mysql-server-5.5

Setting up mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.5

sudo apt-get -f instalar

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
2 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.46-0ubuntu0.14.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package 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 package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

echo "exit 0" > > /etc/init.d/mysql dpkg --configure -a

Setting up mysql-server-5.5 (5.5.46-0ubuntu0.14.04.2) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package 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 package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

O que poderia estar causando isso e como eu poderia resolvê-lo?

Eu fiz algumas pesquisas e verifiquei as postagens anteriores do askubuntu, mas nada que eu tentei parece funcionar.

Obrigado.

    
por Dave Melia 08.12.2015 / 12:46

2 respostas

2

  1. Tente o seguinte, se isso não funcionar, tente o segundo método ou apenas instale o MySQL usando o terceiro método.

Limpe seu sistema de instalações anteriores

sudo apt-get purge mysql*
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update

Finalmente instale o MySQL.

sudo apt-get install mysql-client-core-5.5 mysql-server libmysqlclient-dev

Isto irá instalar mysql-server de acordo com o pacote do cliente. libmysqlclient-dev são " arquivos de desenvolvimento de banco de dados MySQL ".

  1. Tente atualizar sua distribuição primeiro e depois instalar o MySQL.

Para atualizar sua distribuição

sudo apt-get update
sudo apt-get upgrade

Então

sudo apt-get install mysql-client mysql-server libmysqlclient-dev


  1. Instalando o "MySQL 5.5" em seu site oficial. % bl0ck_qu0te%


Se você está no Ubuntu 14.04, como eu, clique em Instalando o MySQL 5.5 no Linux Usando Pacotes Debian na página Instalando e Atualizando o MySQL 5.5 .

    
por Usama Haq 08.12.2015 / 14:58
0

Descobri que, se você está fazendo a configuração de dependência na raiz, parece funcionar.

$ sudo -i 
$ sudo dpkg --configure mysql-server
    
por cruise_lab 03.12.2017 / 20:00