Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: jameswilson on October 30, 2011, 08:05:55 PM

Title: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 08:05:55 PM
Ive been trying to to find this. But also hoping an update would fix it. But its been a few months now and it hasnt fixed itself (i know it was unlikly but it does sometimes)

anyway
on bootup of the machine it keep saying its 'waiting for mysql'

the mysql current log is empty so it the historic ones for some reason

Quote
Oct 30 10:23:57 smebox esmith::event[1590]: Running event handler: /etc/e-smith/events/bootstrap-console-save/S40mysql-load-tables
Oct 30 10:23:57 smebox esmith::event[1590]: mysqld is disabled - no tables restored 
Oct 30 10:23:57 smebox esmith::event[1590]: S40mysql-load-tables=action|Event|bootstrap-console-save|Action|S40mysql-load-tables|Start|1319970237 30007|End|1319970237 92315|Elapsed|0.062308
Oct 30 10:23:57 smebox esmith::event[1590]: Running event handler: /etc/e-smith/events/bootstrap-console-save/S50navigation-conf

im assuming this is why its waiting for it to start

If i start mysql manually after a reboot all seems wel but id like to stop the error plus it cant load certain things at boot as mysql isnt started.

Any ideas please?

Thanks

James
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 08:10:11 PM
I also get a lot of

Quote
Oct 30 10:27:26 smebox mysqld: Starting MySQL:  succeeded
Oct 30 10:28:05 smebox last message repeated 12 times
Oct 30 10:29:11 smebox last message repeated 6 times
Oct 30 10:30:17 smebox last message repeated 8 times
Oct 30 10:31:33 smebox last message repeated 14 times
Oct 30 10:32:49 smebox last message repeated 5 times
Oct 30 10:34:08 smebox last message repeated 4 times
Oct 30 10:35:19 smebox last message repeated 4 times
Oct 30 10:36:23 smebox last message repeated 4 times
Oct 30 10:37:26 smebox last message repeated 4 times
Oct 30 10:38:32 smebox last message repeated 6 times
Oct 30 10:39:33 smebox last message repeated 5 times
Oct 30 10:40:40 smebox last message repeated 5 times
Oct 30 10:41:51 smebox last message repeated 2 times

which im unsure is an issue or not
Title: Re: Strange problems with Mysql after power failure
Post by: cactus on October 30, 2011, 08:49:15 PM
What is the output off the following commands:
Code: [Select]
sv s mysqd
mysqlcheck --all-databases
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 08:58:49 PM
sv s mysqld (i assume you meant this)
Quote
down: mysqld: 34292s; run: log: (pid 1504) 34292s

mysqlcheck --all-databases

all databases OK (i assume you dont want the list?)

thanks for the reply
Title: Re: Strange problems with Mysql after power failure
Post by: cactus on October 30, 2011, 09:03:03 PM
sv s mysqld (i assume you meant this)
mysqlcheck --all-databases
Then your databases seem to be OK. When are you experiencing these problems? Only on restarts? Every restart or only specific ones, e.g. after updates and/or configuration changes?
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 09:05:24 PM
After every restart. I have to manually start mysql Im wondering if its no longer in the init but im out of my depth in there
Title: Re: Strange problems with Mysql after power failure
Post by: cactus on October 30, 2011, 09:07:17 PM
After every restart. I have to manually start mysql Im wondering if its no longer in the init but im out of my depth in there
Did you already look through /var/log/messages* to see what might be the error message that is repeated, there should be some more information in one of them.
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 09:09:01 PM
i copied and pasted it as its in the log. I assumed there would be an error then the 'last message repeated' but that is as it shows
Title: Re: Strange problems with Mysql after power failure
Post by: Stefano on October 30, 2011, 09:31:45 PM
what's the output of
Code: [Select]
config show mysqld
?
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 09:33:49 PM
Quote
mysqld=service
    LocalNetworkingOnly=no
    TCPPort=3306
    access=public
    status=disabled
Title: Re: Strange problems with Mysql after power failure
Post by: cactus on October 30, 2011, 10:12:24 PM
Code: [Select]
mysqld=service
    LocalNetworkingOnly=no
    TCPPort=3306
    access=public
    status=disabled
Why is it disabled?  Did you do that on purpose? I think this is the reason of your errors, MySQL server is not running at boot time... when trying to access it is not responding triggering the error messages.

To restore the status to enabled execute the following code:
Code: [Select]
db configuration setprop mysqld status enabled
NB Next time, please use the code element for console output, that is easier when quoting as this will make sure that is also in the quote (since only one level of quotes seem to be allowed in the forums).
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 10:14:08 PM
no i havnt disabled it. Well not intentionally
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 10:51:04 PM
how do i enable it?

James
Title: Re: Strange problems with Mysql after power failure
Post by: cactus on October 30, 2011, 10:56:04 PM
how do i enable it?

James
See my earlier post. I was still modifying it at the time of your reply, so you might have missed it:

To restore the status to enabled execute the following code:
Code: [Select]
db configuration setprop mysqld status enabled
Title: Re: Strange problems with Mysql after power failure
Post by: jameswilson on October 30, 2011, 11:06:01 PM
Wonderful Wonderful

Many thanks again guys that was all it was.

Thankyou

James