TurnKey Linux Virtual Appliance Library

[solved]Problems stopping MySQL within TKLPatching process

Jeremy's picture

Hi all,

I'm updating my SimpleInvoices patch ATM and have stuck a strange problem. In the conf script, when finishing up the patching process I stop the MySQL service (as per you usually do - so the patching can complete cleanly) but when stopping MySQL errors with first:

ERROR 2013 (HY000): Lost connection to MySQL server at 'sending authentication information', system error: 32

Then followed with about 10-15 lines of this error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I have googled extensively and it seems like a common problem that relates to MySQL not running... But I'm closing MySQL so of course it's not running...!

I initially thought that perhaps the database import is being interupted but i have tried using the 'wait' command to wait until the import has completed (a google turned this command up but I'm not 100% sure that it's working...). But the error still occurs. The funny thing is that if I apply the patch manually (extract ISO, chroot in, copy paste conf file line-by-line) it works as expected, but when running the patch via TKLPatch it errors everytime...

I have also checked that the data is in MySQL and it seems that it's all there so I'm really not sure what is going on!?

I have also tried turning on TKLPatch debugging and it isn't showing up anything that seems to be an issue...

Anybody got any ideas for me?

[update] Doing a little more testing and it seems there is an Apache issue too:

apache2: apr_sockaddr_info_get() failed for core

Not sure if this is related, or just another issue...?

Jeremy's picture

Turns out my problem was stopping MySQL while still writing DB

I tested using sleep 30 (which makes the script wait for 30 secs) and the patch completed successfully. So what I ended up doing was importing the DB right at the start of the conf (which allows it to finish while all the other stuff happens) and now the patching process completes fine.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)