MySQL errors after power outage

SQUIGMUIRE

New Member


Messages: 12

#1
I could really use some help. I had a power outage last Monday and ever since I have ran scans to get FreeBSD back up. It will work for a little but none of the database are working then at least once a day it locks up. I have to reboot it and do another scan usually on g and sometimes h. Any help is really appreciated.
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#2
I think I might have a little more information...I was poking around and it shows that mysql is not running and when I try to start mysql it will not start...Any Suggestions?
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,615
Messages: 13,850

#3
The first thing to do is check your backups.

The second thing to do--after verifying that you have full backups--is to boot in single user mode and use fsck(8) the filesystems.

If there are still problems after that, please post the exact output it shows when you try to start MySQL.
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#6
I might I am just learning on the fly someone else setup the server. And I havent touch bsd in like 12 years so what I did know I barely remember. Any help would be appreciated.
 

usdmatt

Daemon

Thanks: 475
Messages: 1,305

#7
Have a look in /var/db/mysql/hostname.err to see if MySQL is logging any errors when it starts.
It may well be that one or more databases/tables are corrupt. If so, you'll have to follow the MySQL documentation to attempt recovery. If it's not corruption, hopefully the error log will say what's wrong.

If the machine is locking up regularly, that's not a particularly good sign. It is wise me asking how old the machine is or the version of FreeBSD on it..?

If it was me and I was unsure about backups, I think I'd be looking to get as much data backed up as possible while it was running before worrying about fixing the stability problems.
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#8
I do know its old the last admin told me it needed to be upgraded but said that moving the databases to a new version would be a big headache. Thats why I was trying to at least get it back up first then work on the rest.
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#9
Ok I tried using tail /var/db/mysql/hostname.err on my server and said file does not exist is there something I'm doing wrong? Thank you for your help.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,332
Messages: 27,502

#10
Replace hostname with the actual hostname of the machine.
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#11
I tried that and still get the same error...is there a command to view everything in a directory page by page...I do ls and it scrolls to fast before I can see the top part of the list in mysql directory
 

usdmatt

Daemon

Thanks: 475
Messages: 1,305

#12
You could run one of the following to either page the list, or only show files ending in err.
It's possible MySQL may be using a different location although /var/db/mysql is the default.

Code:
# ls |more
# ls *err
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#14
Awesome that helped now I was able to find it. The error log is showing that there are tables that are marked as crashed and should be repaired could you help me with the command to do that
 
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#18
Ok I figured out how to get into mysql but couldn't get the repair table to work can you tell me the exact command also I found mysqlcheck command in my research but when I run it after about 30 if that it comes up with a error 2013 lost connection to MYSQL server during query any suggestions on how to correct that?
 
Last edited by a moderator:
OP
OP
S

SQUIGMUIRE

New Member


Messages: 12

#20
How will this help me with the timeout issue? If I'm reading correctly this is just a search utility?
 
Last edited by a moderator:
Top