Je constate qu'il y a eu de nombreuses répétitions de cette question (ici, sur le tableau de bord, le superutilisateur, etc.). J'ai essayé toutes les solutions et suggestions ici mise à jour de la version 16.04 mysql-server , ici https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/ 156916 , et ici https://bugs.mysql.com/bug.php?id=72722 . Mais rien n'a aidé.
Vous trouverez ci-dessous le résultat de Sudo dpkg --configure -a
après l’échec de l’installation.
Setting up mysql-server-5.7 (5.7.13-0ubuntu0.16.04.2) ...
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ Perl_DL_NONLAZY=1
++ export Perl_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-server-5.7.postinst configure ''
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
+ '[' -n '' ']'
+ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ ERR_LOGGER='logger -p daemon.err -t mysqld_safe -i'
+ set +e
+ invoke stop
+ pathfind invoke-rc.d
+ OLDIFS='
'
+ IFS=:
+ for p in '$PATH'
+ '[' -x /usr/local/sbin/invoke-rc.d ']'
+ for p in '$PATH'
+ '[' -x /usr/local/bin/invoke-rc.d ']'
+ for p in '$PATH'
+ '[' -x /usr/sbin/invoke-rc.d ']'
+ IFS='
'
+ return 0
+ invoke-rc.d mysql stop
+ set -e
+ case "$1" in
+ mysql_datadir=/usr/share/mysql
+ mysql_statedir=/var/lib/mysql
+ mysql_rundir=/var/run/mysqld
+ mysql_logdir=/var/log/mysql
+ mysql_cfgdir=/etc/mysql
+ mysql_upgradedir=/var/lib/mysql-upgrade
+ mysql_filesdir=/var/lib/mysql-files
+ mysql_keyringdir=/var/lib/mysql-keyring
+ aa-status --enabled
+ apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld
+ /usr/share/mysql-common/configure-symlinks install mysql /etc/mysql/mysql.cnf
+ for d in '$mysql_statedir' '$mysql_filesdir' '$mysql_keyringdir' '$mysql_logdir'
+ '[' '!' -d /var/lib/mysql -a '!' -L /var/lib/mysql ']'
+ chown -R mysql:mysql /var/lib/mysql
+ chmod 0700 /var/lib/mysql
+ for d in '$mysql_statedir' '$mysql_filesdir' '$mysql_keyringdir' '$mysql_logdir'
+ '[' '!' -d /var/lib/mysql-files -a '!' -L /var/lib/mysql-files ']'
+ chown -R mysql:mysql /var/lib/mysql-files
+ chmod 0700 /var/lib/mysql-files
+ for d in '$mysql_statedir' '$mysql_filesdir' '$mysql_keyringdir' '$mysql_logdir'
+ '[' '!' -d /var/lib/mysql-keyring -a '!' -L /var/lib/mysql-keyring ']'
+ chown -R mysql:mysql /var/lib/mysql-keyring
+ chmod 0700 /var/lib/mysql-keyring
+ for d in '$mysql_statedir' '$mysql_filesdir' '$mysql_keyringdir' '$mysql_logdir'
+ '[' '!' -d /var/log/mysql -a '!' -L /var/log/mysql ']'
+ chown -R mysql:mysql /var/log/mysql
+ chmod 0700 /var/log/mysql
+ set +e
+ chown -R 0:0 /usr/share/mysql
+ touch /var/log/mysql/error.log
+ chown -R mysql:adm /var/log/mysql
+ chmod 0750 /var/log/mysql
+ chmod 0640 /var/log/mysql/error.log
+ set -e
+ db_set mysql-server/postrm_remove_database false
+ _db_cmd 'SET mysql-server/postrm_remove_database' false
+ _db_internal_IFS='
'
+ IFS=' '
+ printf '%s\n' 'SET mysql-server/postrm_remove_database false'
+ IFS='
'
+ IFS='
'
+ read -r _db_internal_line
+ RET='10 mysql-server/postrm_remove_database doesn'\''t exist'
+ case ${_db_internal_line%%[ ]*} in
+ return 10
+ true
+ dpkg --compare-versions '' le 5.7.13-0ubuntu0~
+ echo 'Renaming removed key_buffer and myisam-recover options (if present)'
Renaming removed key_buffer and myisam-recover options (if present)
+ fix_old_config_options
+ '[' -f /etc/mysql/my.cnf.migrated ']'
+ return 0
+ test_mysqld_startup
+ result=0
++ mysqld --verbose --help --innodb-read-only
+ output=
+ '[' '!' 0 = 0 ']'
+ return 0
+ dc=/etc/mysql/debian.cnf
++ fgrep mysql_upgrade /etc/mysql/debian.cnf
+ '[' -e /etc/mysql/debian.cnf -a -n '[mysql_upgrade]' ']'
++ sed -n 's/^[ ]*password *= *// p' /etc/mysql/debian.cnf
++ head -n 1
+ pass=FDfqfpyjUDJiVbgI
+ sed -i /basedir/d /etc/mysql/debian.cnf
+ chown 0:0 /etc/mysql/debian.cnf
+ chmod 0600 /etc/mysql/debian.cnf
++ ls -A /var/lib/mysql
+ '[' '!' 'auto.cnf
debian-5.1.flag
debian-5.5.flag
debian-5.7.flag
ib_buffer_pool
ibdata1
ib_logfile0
ib_logfile1
mysql
mysql_upgrade_info
performance_schema
test' ']'
+ existingdatabase=1
+ touch /var/lib/mysql/debian-5.7.flag
+ '[' configure = configure ']'
+ APP_PROFILE=/etc/apparmor.d/usr.sbin.mysqld
+ '[' -f /etc/apparmor.d/usr.sbin.mysqld ']'
+ LOCAL_APP_PROFILE=/etc/apparmor.d/local/usr.sbin.mysqld
+ test -e /etc/apparmor.d/local/usr.sbin.mysqld
+ aa-status --enabled
+ apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld
+ deb-systemd-helper unmask mysql.service
+ deb-systemd-helper --quiet was-enabled mysql.service
+ deb-systemd-helper enable mysql.service
+ '[' configure = configure ']'
+ '[' -x /etc/init.d/mysql ']'
+ update-rc.d mysql defaults 19 21
+ '[' -x /etc/init.d/mysql ']'
+ invoke-rc.d mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
+ exit 1
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
Voici le résultat de systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-post) (Result: exit-code) since Tue 2016-08-16 15:56:55 PDT; 18s ago
Process: 19414 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 19411 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 19414 (code=exited, status=1/FAILURE); : 19415 (mysql-systemd-s)
CGroup: /system.slice/mysql.service
└─control
├─19415 /bin/bash /usr/share/mysql/mysql-systemd-start post
└─19480 sleep 1
Aug 16 15:56:55 megatron systemd[1]: Starting MySQL Community Server...
Aug 16 15:56:57 megatron systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
et de journalctl -xe
Aug 16 16:01:05 megatron systemd[1]: mysql.service: Unit entered failed state.
Aug 16 16:01:05 megatron systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 16 16:01:05 megatron systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Aug 16 16:01:05 megatron systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Aug 16 16:01:05 megatron systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Aug 16 16:01:07 megatron systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Aug 16 16:01:09 megatron smbd[20383]: pam_unix(samba:session): session closed for user nobody
Aug 16 16:01:09 megatron smbd[20386]: pam_unix(samba:session): session closed for user nobody
Aug 16 16:01:11 megatron smbd[20391]: pam_unix(samba:session): session closed for user nobody
Aug 16 16:01:15 megatron smbd[20398]: pam_unix(samba:session): session closed for user nobody
Aug 16 16:01:36 megatron systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Aug 16 16:01:36 megatron systemd[1]: mysql.service: Unit entered failed state.
Aug 16 16:01:36 megatron systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 16 16:01:36 megatron systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Aug 16 16:01:36 megatron systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Aug 16 16:01:36 megatron systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Aug 16 16:01:38 megatron systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Quelqu'un peut-il aider s'il vous plait? Je suis au bout de mes peines avec celui-ci et je ne veux pas faire une nouvelle installation. J'ai besoin de cette installation pour terminer afin de pouvoir installer certains logiciels pour le travail.
OK, on dirait que je l'ai compris. Cela a résolu le problème:
Sudo dpkg -P --force depends mysql-server mysql-server-5.7 mysql-common mysql-server-core-5.7 php5-mysql mysql-client-5.7 mysql-client-core-5.7
J'ai trouvé la solution ici https://ubuntuforums.org/showthread.php?t=1763604&page=