Error: Could not lock status data tables in database 'nagios

I get this error since this morning…
Error: Could not lock status data tables in database ‘nagiosmysql’

What can i do from here
I am very new a this

thanks ahead for you help everyone…
Plurnay

I did remove some file in the /var/log/mysql/mysql-bin.0000XX this morning to save some space with the rm command command could this have trigger this error?

and if yes how to i fix it :’(

it surely was that which caused the error…
try having alook for the check table and repair table commands.

here’s one of the google results you’ll get articles.techrepublic.com.com/51 … 93721.html

hey thanks I did exactly what you just said… its work like a charm…

I did
myisamchk /var/lib/mysql/nagiosmysql/*.MYI
that check all my .myi files

then this came back

Checking MyISAM file: /var/lib/mysql/nagiosmysql/servicestatus.MYI
Data records: 37 Deleted blocks: 0
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 2 clients are using or haven’t closed the table properly

  • check file-size
    myisamchk: error: Size of datafile is: 5748 Should be: 5912
  • check record delete-chain
  • check key delete-chain
  • check index reference
  • check record links
    myisamchk: error: Record-count is not ok; is 36 Should be: 37
    myisamchk: warning: Found 36 parts Should be: 37 parts
    MyISAM-table ‘/var/lib/mysql/nagiosmysql/servicestatus.MYI’ is corrupted
    Fix it using switch “-r” or “-o”

myisamchk --recover /var/lib/mysql/nagiosmysql/servicestatus.MYI

  • recovering (with keycache) MyISAM-table '/var/lib/mysql/nagiosmysql/servicestatus.MYI’
    Data records: 37
    Data records: 36

Now it working

btw it wasnt because i remove some log file
I think the vm was full so must of trying to right some in a table
and then linux decided that he doesnt have access the the HD anymore?
I dont know, but its working now…

SO THANKS AGAIN!!!
PR

Yes you are right the bin files are needed for replication… (you can disable the creation of bin log files in my.ini

i think it should be here: dev.mysql.com/doc/refman/5.1/en/binary-log.html

Not sure why it crashed, not enough disc space would cause mysql to stop not to crash the tables…

Anyway happy it worked :slight_smile: