[mythtv-users] mysql not starting on boot

Douglas Peale Douglas_Peale at comcast.net
Thu Jul 29 18:32:25 UTC 2010


On 07/27/2010 11:15 AM, Douglas Peale wrote:
> On 07/27/2010 09:46 AM, paul wrote:
>> On 26/07/10 20:20, paul wrote:
>>> On 26/07/10 19:51, Douglas Peale wrote:
>>>> On 07/25/2010 03:59 AM, paul wrote:
>>>>> On 25/07/10 03:08, Douglas Peale wrote:
>>>>>> On 07/24/2010 12:38 AM, paul wrote:
>>>>>>
>>>>>>> After the last update mysql is now not starting on boot, it has to be
>>>>>>> started manually, does anyone know how to fix this?
>>>>>>>
>>>>>>>
>>>>>> I'm suffering the same issue. What command are you using to start
>>>>>> mysql?
>>>>>>
>>>>>> I'm using "sudo dpkg-reconfigure mythtv-database" but I'm sure that is
>>>>>> not what I should be using.
>>>>>>
>>>>>> I tried "sudo mysqld start" but that did not work.
>>>>>> _______________________________________________
>>>>>> mythtv-users mailing list
>>>>>> mythtv-users at mythtv.org
>>>>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>>>>
>>>>>>
>>>>> As it is now an upstart service you use:
>>>>>
>>>>> sudo service mysql start
>>>>>
>>>>> Thanks for reporting it as a bug, I wasn't sure if you was specific to
>>>>> my set up or not.
>>>>>
>>>>> Paul
>>>>>
>>>> My bug report has been marked as a duplicate of Bug #608423
>>>> This bug claims to have a fix, but I do not understand how one would
>>>> apply it.
>>>> _______________________________________________
>>>> mythtv-users mailing list
>>>> mythtv-users at mythtv.org
>>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>>
>>>
>>> The fix appears to be to get mythtv-backed to wait until mysql has
>>> started.... as mysql will never start neither will myth-backend.  This
>>> bug does not look the same to me.
>>>
>>> I have tried  "net-device-up IFACE=lo" and "net-device-up IFACE=ath0" 
>>> in the /etc/init/mysql.conf file and neither works for my setup.
>>>
>>> diff -uNr mythtv-0.23.0+fixes25396.old/debian/mythtv-backend.upstart
>>> mythtv-0.23.0+fixes25396/debian/mythtv-backend.upstart
>>> --- mythtv-0.23.0+fixes25396.old/debian/mythtv-backend.upstart   
>>> 2010-07-20 19:02:49.000000000 -0400
>>> +++ mythtv-0.23.0+fixes25396/debian/mythtv-backend.upstart   
>>> 2010-07-24 02:23:02.836117249 -0400
>>> @@ -3,8 +3,10 @@
>>>  description     "MythTV Backend"
>>>  author          "Mario Limonciello<superm1 at ubuntu.com>"
>>>
>>> -start on (local-filesystems and net-device-up IFACE=lo and started
>>> udev-finish)
>>> -stop on starting shutdown
>>> +start on (local-filesystems and net-device-up IFACE=lo and started
>>> udev-finish
>>> +          and started mysql)
>>> +stop on (starting shutdown
>>> +         or stopping mysql)
>>>
>>>  #expect fork
>>>  respawn
>>>
>>>
>>>
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>
>> As suggested by Douglas Peale the solution is at the bottom of this bug
>> https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.1/+bug/608423,
>>
>> The amended /etc/init/mysql.conf is as follows (in full), obviously back
>> up the original before trying this version but it has successfully
>> started mysql for me bear in mind that I applied the modifications
>> suggested in the diff in the 608423 bug report to my existing file:
>>
>> Paul
>>
>> # MySQL Service
>>
>> description     "MySQL Server"
>> author          "Mario Limonciello <superm1 at ubuntu.com>"
>>
>> start on (net-device-up
>>           and local-filesystems
>>       and runlevel [2345])
>> stop on runlevel [016]
>>
>> respawn
>>
>> env HOME=/etc/mysql
>> umask 007
>>
>> pre-start script
>>     #Sanity checks
>>     [ -r $HOME/my.cnf ]
>>     [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d
>> /var/run/mysqld
>>     # Load AppArmor profile
>>     if aa-status --enabled 2>/dev/null; then
>>         apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld || true
>>     fi
>>     LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 |
>> awk '{ exit ($4<4096) }'
>> end script
>>
>> exec /usr/sbin/mysqld
>>
>> post-start script
>>     for i in `seq 1 30` ; do
>>         /usr/bin/mysqladmin --defaults-file="$HOME"/debian.cnf ping && {
>>             exec "$HOME"/debian-start
>>             #Should not reach this line
>>             exit 2
>>         }
>>         sleep 1
>>     done
>>     echo "timeout waiting for mysqld" >&2
>>     exit 1
>> end script
>>
>>
>>
> 
> Thank you for including the entire file. I was unable to figure out how to implement the fix via the bug report page. This I was
> able to implement, and yes it does work.

The latest update via the proposed builds broke mysql again, I'm going to change back to the above script.


More information about the mythtv-users mailing list