web-dev-qa-db-fra.com

Problèmes d'installation de MySQL Server

Je rencontre un problème pour installer mysql et/ou mariadb.

Je reçois ce qui suit:

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)

Exactement le même problème/message d'erreur avec mariadb-server aussi.

trucs j'ai essayé:

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 install

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

Quelle pourrait en être la cause et comment pourrais-je le résoudre?

J'ai fait quelques recherches sur Google et vérifié les publications précédentes de askubuntu, mais rien de ce que j'ai essayé ne semble fonctionner.

Merci.

3
Dave Melia
  1. Essayez ce qui suit, si cela ne fonctionne pas, essayez la 2ème méthode ou installez simplement MySQL en utilisant la 3ème méthode.

Nettoyez votre système des installations précédentes

 Sudo apt-get purge mysql * 
 Sudo apt-get clean 
 Sudo apt-get autoremove 
 Sudo apt-get autoclean 
 Sudo apt- obtenir la mise à jour

Enfin, installez MySQL.

 Sudo apt-get installe mysql-client-core-5.5 mysql-server libmysqlclient-dev 

Cela installera mysql-server en fonction du paquet client. libmysqlclient-dev sont " fichiers de développement de la base de données MySQL ".

  1. Essayez d'abord de mettre à jour votre distribution, puis d'installer MySQL.

Pour mettre à jour votre distribution

 Sudo apt-get update 
 Sudo apt-get upgrade 

Ensuite

 Sudo apt-get installez mysql-client mysql-server libmysqlclient-dev 


  1. Installation de "MySQL 5.5" à partir de son site officiel.


Si vous êtes sur Ubuntu 14.04, comme moi, cliquez sur Installation de MySQL 5.5 sur Linux à l’aide de paquets Debian dans le dossier Installation et mise à niveau de la page MySQL 5.5 .

3
Usama Haq

J'ai constaté que si vous effectuez la configuration de dépendance dans root, cela semble fonctionner.

$ Sudo -i 
$ Sudo dpkg --configure mysql-server
0
cruise_lab