[mythtv-users] mythweb unable to connect after upgrade to 028

George Bingham georgeb1962 at gmail.com
Sun May 8 17:47:12 UTC 2016


Hi Richard,

On my system (mythbuntu 16.04) here's the mysql.service file:
*# MySQL systemd service file*

*[Unit]*
*Description=MySQL Community Server*
*After=network-online.target*

*[Install]*
*WantedBy=multi-user.target*

*[Service]*
*User=mysql*
*Group=mysql*
*PermissionsStartOnly=true*
*ExecStartPre=/usr/share/mysql/mysql-systemd-start pre*
*ExecStart=/usr/sbin/mysqld*
*ExecStartPost=/usr/share/mysql/mysql-systemd-start post*
*TimeoutSec=600*
*Restart=on-failure*
*RuntimeDirectory=mysqld*
*RuntimeDirectoryMode=755*

And here's the /usr/share/mysql/mysql-systemd-start file's contents:

*#!/bin/bash*
*#*
*# Scripts to run by MySQL systemd service*
*#*
*# Needed argument: pre | post*
*#*
*# pre mode  :  try to perform sanity check for configuration, log, data*
*# post mode :  ping server until answer is received*

*sanity () {*
*  if [ ! -r /etc/mysql/my.cnf ]; then*
*    echo "MySQL configuration not found at /etc/mysql/my.cnf. Please
create one."*
*    exit 1*
*  fi*

*  if [ ! -d /var/lib/mysql ] && [ ! -L /var/lib/mysql ]; then*
*    echo "MySQL data dir not found at /var/lib/mysql. Please create one."*
*    exit 1*
*  fi*

*  if [ ! -d /var/lib/mysql/mysql ] && [ ! -L /var/lib/mysql/mysql ]; then*
*    echo "MySQL system database not found. Please run mysql_install_db
tool."*
*    exit 1*
*  fi*
*}*

*pinger () {*
*  server_up=false*
*  for i in $(seq 1 30); do*
*    sleep 1*
*    if mysqladmin ping >/dev/null 2>&1; then*
*      server_up=true*
*      break*
*    fi*
*  done*
*  if [ ! $server_up ]; then*
*    echo "MySQL server not started"*
*    exit 1*
*  fi*
*}*

*case $1 in*
*  "pre")  sanity ;;*
*  "post") pinger ;;*
*esac*


I don't see anywhere a check to see if sockets are up, unless that's what
'mysqladmin' does, but it's a binary file and I don't know enough about
mysql to know what that does.



-- George

On Sun, May 8, 2016 at 6:58 AM, Richard Shaw <hobbes1069 at gmail.com> wrote:

> What does your mysqld.service or mariadb.service file look like? On Fedora
> it looks like this:
>
> [Service]
> Type=simple
> User=mysql
> Group=mysql
>
> ExecStartPre=/usr/libexec/mysql-check-socket
> ExecStartPre=/usr/libexec/mysql-prepare-db-dir %n
> # Note: we set --basedir to prevent probes that might trigger SELinux
> alarms,
> # per bug #547485
> ExecStart=/usr/bin/mysqld_safe --basedir=/usr
> ExecStartPost=/usr/libexec/mysql-wait-ready $MAINPID
> ExecStartPost=/usr/libexec/mysql-check-upgrade
> ExecStopPost=/usr/libexec/mysql-wait-stop
>
> So not only does it start mysqld but it uses some kind of wait script to
> presumably wait until it's ready to accept connections before it tells
> systemd it's "up".
>
> Richard
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160508/e22286ca/attachment.html>


More information about the mythtv-users mailing list