1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do you suggest to prevent crashed MyISAM table?

Discussion in 'Site & Server Administration' started by postcd, Oct 18, 2019.

  1. #1
    On my site was an error:
    General Error SQL ERROR [ mysqli ] - Table 'phpbb_sessions' is marked as crashed and should be repaired
    SEMrush
    I could click to repair that table in mysql manager - PHPMyAdmin and that fixed it. Also the command is: REPAIR TABLE phpbb_sessions;

    But the question is how to prevent it. Someone said that MyISAM tables crash like this due to something unexpected, like a server failure, out of memory/disk space or breakdown. There is nothing i can do to prevent it if i am not a server admin. What if i am?
    Or maybe if i am just a shared hoting user with basic SSH access and cronjob, i can run a cron task executing a bash script containing: mysqlcheck -C / mysqlcheck -c

    If my server support InnoDB, should i convert just this one table (i found this one to be only one that gets crashed from time to time)?
    I found SQL command: ALTER TABLE table_name ENGINE=InnoDB;
    I would backup table_name before running that.
     
    postcd, Oct 18, 2019 IP
    SEMrush