MySQL crash

Discussion in 'Installation/Configuration' started by zbuzanic, Nov 6, 2015.

  1. zbuzanic

    zbuzanic Member

    Debian 8, MySQL 5.5.46
    I stopped server and dbispconfig database was not closed properly.
    Now I'm spammed with thousand email reports:
     WARNING - DB::query(REPLACE INTO monitor_data (server_id, type, created, data, state) VALUES (9, 'services', UNIX_TIMESTAMP(), 'a:7:{s:9:\"webserver\";i:1;s:9:\"ftpserver\";i:1;s:10:\"smtpserver\";i:-1;s:10:\"pop3server\";i:-1;s:10:\"imapserver\";i:-1;s:10:\"bindserver\";i:1;s:11:\"mysqlserver\";i:1;}', 'ok')) -> mysqli_query Table './dbispconfig/monitor_data' is marked as crashed and last (automatic?) repair failed
    Mysql throwing errors on tables:
    Can't change ownership of the file '/var/lib/mysql/dbispconfig/*.MYD
    Can’t create new tempfile: ‘*.TMD
    I've tried to boot rescue, run fsck and that cleaned some broken entries and I was able to fix dbispconfig so I can now open ispconfig control panel.
    Also I did try to run this and numerous other suggestions from Google
    myisamchk -r -f  *.MYI
    mysqlcheck -r dbispconfig
    chown mysql:mysql all files
    give 700 permissions
    I did try to export all tables, then drop all tables and import back, same thing
    Any idea how to resolve this? Maybe to dump dbispconfig, then delete db and import? Didn't try that one... But I'm afraid to break something as this is the master server :)
    Last edited: Nov 6, 2015
  2. zbuzanic

    zbuzanic Member

    Ok, I think I got it resolved with this... I hope:
     sudo -u mysql myisamchk -r -v -f mysql/dbispconfig/*
    I'll report if this fixed it, but for now it seems I had to run repair as mysql user as running as root throws permission errors??
  3. zbuzanic

    zbuzanic Member

    Ok, now it throws me this:
    mysqli_query Incorrect key file for table './dbispconfig/monitor_data.MYI'; try to repair it
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to delete the monitor_data table with phpmyadmin. Then recreate it with the table definition that you fin in install/sql/ispconfig3.sql inside the ispconfig3 tar.gz file.
  5. zbuzanic

    zbuzanic Member

    Just a heads up, doing "repair" on monitor_data resolved the last issue. Main problem with ownership was fixed with this, running as root will not fix it!:
     sudo -u mysql myisamchk -r -v -f mysql/dbispconfig/*

Share This Page