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
- 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
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.
ReplyDeleteYour welcome.......
DeleteI'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?
ReplyDeletePlease try to get access via terminal, then you can get to the database. You can not do anything with the FTP.
Delete