[mythtv-users] upgrade to 16.04 - mysql - sudo apt-get upgrade failing - please help

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Jun 6 04:51:01 UTC 2016


On Sun, 5 Jun 2016 16:44:20 -0700, you wrote:

>Hi all,
>
>       I tried to upgrade 14.04 and my TV/screen crashed. After dropping
>down to BIOS, switching to faithful old VGA monitor, and recovering I was
>able to recover and upgrade to 16.06.
>
>       symptoms:
>              - Mythtv doesn't let me start back end, cant connect to mysql
>              - mythweb gives this error with mysql :
>                        Fatal Error
>                    !!NoTrans: Can't connect to local MySQL server through
>socket '/var/run/mysqld/mysqld.sock' (2) [#2002]
>               - sudo apt-get update runs ok
>               - sudo apt-get upgrade crashes on mysql :
>
>doug at Hydra:~$ sudo apt-get update
>
>Hit:1 http://ppa.launchpad.net/mythbuntu/0.28/ubuntu xenial InRelease
>
>Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
>
>Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
>
>Hit:4 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
>
>Get:5 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2
>kB]
>
>Get:6 http://us.archive.ubuntu.com/ubuntu xenial-proposed InRelease [247 kB]
>
>Fetched 339 kB in 15s (21.3 kB/s)
>
>Reading package lists... Done
>
>
>doug at Hydra:~$ sudo apt-get upgrade
>
>Reading package lists... Done
>
>Building dependency tree
>
>Reading state information... Done
>
>Calculating upgrade... Done
>
>0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
>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.1) ...
>
>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.
>
>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 its a followup
>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)
>
>doug at Hydra:~$
>
>
>- systemctl status mysql.service
>
>? mysql.service - MySQL Community Server
>
>   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor
>preset: en
>
>   Active: activating (start-post) (Result: exit-code) since Sun 2016-06-05
>16:3
>
>  Process: 11867 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
>
>  Process: 11864 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
>(code=exi
>
> Main PID: 11867 (code=exited, status=1/FAILURE);         : 11868
>(mysql-systemd
>
>   CGroup: /system.slice/mysql.service
>
>           ??control
>
>             ??11868 /bin/bash /usr/share/mysql/mysql-systemd-start post
>
>             ??11919 sleep 1
>
>
>Jun 05 16:39:24 Hydra systemd[1]: Starting MySQL Community Server...
>
>Jun 05 16:39:26 Hydra systemd[1]: mysql.service: Main process exited,
>code=exite
>
>lines 1-13/13 (END)
>
>? mysql.service - MySQL Community Server
>
>   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor
>preset: enabled)
>
>   Active: activating (start-post) (Result: exit-code) since Sun 2016-06-05
>16:39:24 PDT; 11s ago
>
>  Process: 11867 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
>
>  Process: 11864 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
>(code=exited, status=0/SUCC
>
> Main PID: 11867 (code=exited, status=1/FAILURE);         : 11868
>(mysql-systemd-s)
>
>   CGroup: /system.slice/mysql.service
>
>           ??control
>
>             ??11868 /bin/bash /usr/share/mysql/mysql-systemd-start post
>
>             ??11919 sleep 1
>
>
>Jun 05 16:39:24 Hydra systemd[1]: Starting MySQL Community Server...
>
>Jun 05 16:39:26 Hydra systemd[1]: mysql.service: Main process exited,
>code=exited, status=1/FAILUR
>
>
>- journalctl -xe
>
>Jun 05 16:41:25 Hydra systemd[1]: mysql.service: Failed with result
>'exit-code'.
>
>Jun 05 16:41:25 Hydra systemd[1]: mysql.service: Service hold-off time
>over, scheduling restart.
>
>Jun 05 16:41:25 Hydra 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.
>
>Jun 05 16:41:25 Hydra 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.
>
>Jun 05 16:41:27 Hydra systemd[1]: mysql.service: Main process exited,
>code=exited, status=1/FAILURE
>
>Jun 05 16:41:56 Hydra 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.
>
>Jun 05 16:41:56 Hydra systemd[1]: mysql.service: Unit entered failed state.
>
>Jun 05 16:41:56 Hydra systemd[1]: mysql.service: Failed with result
>'exit-code'.
>
>Jun 05 16:41:56 Hydra systemd[1]: mysql.service: Service hold-off time
>over, scheduling restart.
>
>Jun 05 16:41:56 Hydra 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.
>
>Jun 05 16:41:56 Hydra 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

My guess would be that you have been hit by a problem in the mysql
config files that has been mentioned previously on this list.  There
is a config option that had its spelling changed a while ago, but
until recently, mysql accepted both the old and new spelling.  Now the
version of mysql in 16.04 will no longer recognise the old spelling
and you have to change the config file to the new setting.  The
messages about the exact error causing mysql to shut down at startup
will be either in syslog or /var/log/mysql/errors.log.  The option
causing the problem is in the /etc/mysql/conf.d/mythtv-tweaks.cnf file
(installed by an option in mythbuntu-control-centre I believe):

  table_cache = 128

It needs to be replaced by:

  table_open_cache = 128

Anyone reading this who is still running an older version of mysql
should make this change now, so they do not get caught later when
upgrading.

See:

https://bugs.launchpad.net/ubuntu/+source/mythbuntu-common/+bug/1576767


More information about the mythtv-users mailing list