Wednesday, January 16, 2013

My SQL error jos_session' is marked as crashed and should be repaired SQL=INSERT INTO `jos_session`

This is one of the most common error in Joomla and it only means that the table jos_session has crashed or is damage. This table stores your session and you can easily fix this via cPanel or phpmyadmin.

Before you do anything you should backup the database which is located in /var/lib/mysql and then tar the related database. After that you are totally fine for table repair.

Using phpMyAdmin;

First take phpMyAdmin and then place that phpMyAdmin into apache document root. (ex : /var/www/html)
Then using your web browser access the phpMyAdmin interface and login using related Database credentials. Then issue the command REPAIR TABLE `tbl_name`"
That's it. It will fix the issue.

Or you can use command line and use below commands to repair the table.
  • mysql -u root -p
Enter database password.
  • use “database_name”
  • show tables ; This will show you all the tables name under particular database.
  • Then run either truncate table jos_session or repair table jos_session
This will fix the table crashed issue.



4 comments:

  1. Thank you very much. Your knolege helped me a lot! Thank you!!! I had a problem with repair, my mysql kept going off kine after repair the base, but command truncate "___session" was very helpful. Thank you.

    ReplyDelete
  2. I'm having this problem when attempting to login as an admin and cannot get to phpMyAdmin interface... is there something that can be done via FTP?

    ReplyDelete
    Replies
    1. Please try to get access via terminal, then you can get to the database. You can not do anything with the FTP.

      Delete