Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Dawn Foster
Dawn Foster
1,899 Points

#145 - Table '.\phpmyadmin\pma_recent' is marked as crashed and should be repaired

I have installed Xampp on my Windows 7, and everything was working fine.. I had about 7 WP Websites/Databases setup, all working fine.

Then I got a note displaying at the bottom of one of the pages, saying that I didn't have a root password set, and was at risk. So I stupidly changed all three root users's passwords (ie: root:1 root:localhost root 127.0.0.1). Note: I changed all three to the same password.

Or course that broke Apache server totally. After research, I found that I should change the config.inc.php and add the new password there, and then restart the Server. Thankfully that worked!

But now.. on all my databases and for all tables inside of those DBs.. no matter which table I select to look at, I get this error:

Could not save recent table!
#145 - Table '.\phpmyadmin\pma_recent' is marked as crashed and should be repaired

All the tables seem to display correctly, it just shows this as an error at the top of the results page when I click on any table name. If I click on the same table name again, it displays without the error.. but if I go to another table, then come back to the previous table, the error will display again, etc, etc, etc..

It appears that the websites are still functioning.. and that the database tables can still display with or without the error showing.. and I appear to even be able to edit the tables, but I am not confident that all is well with the xampp install now.

Since this error started displaying straight after the changing of and the fixing of the root password, I have a feeling it is related. (If it makes any difference, under Users.. I still have the following users listed as not having a password set: "any" and "pma".) Does the PMA need to be set to the same password as the root to work properly?

Any help would be greatly appreciated!!!!!

2 Answers

Dawn Foster
Dawn Foster
1,899 Points

I was able to figure out the solution: I'll list out the steps here, in case it can help others.

After logging into http://localhost/phpmyadmin, I looked at the list of Databases on the left-side, and clicked on the actual "phpmyadmin" database name. All of it's tables are now listed in the center section. I ticked the table "pma_recent", then scrolled down at the bottom of the list of the tables, clicked on the drop down list, and clicked on the "Repair table" link. That fixed the problem.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Try this:

Login phpMyAdmin, select the database tables, and select Repair. You can also choose to optimize them as well.

Dawn Foster
Dawn Foster
1,899 Points

Hi Zac.

Thanks for your suggestion.. however it didn't help. When I selected all tables of one of my databases, and selected the repair option from the drop down list.. it gave me this result:

 Your SQL query has been executed successfully.  

Which sounds good - However the itemized results also showed this note in the repair line for each table:

 "The storage engine for the table doesn't support r..."  

(I can't see the rest of the note, but I assume that it would say it doesn't support repair.)

I tried clicking on one of the table names again, just to view the contents, and I am still getting the

Could not save recent table!
#145 - Table '.\phpmyadmin\pma_recent' is marked as crashed and should be repaired

Any other suggestions? I really don't want to re-install xampp and then recreate all 7 wordpress/databases sites.

And I really would like to how did this happen in the first place!

Dawn Foster
Dawn Foster
1,899 Points

I was searching the web and found this comment:

The two main Database types are MyISAM and InnoDB. Only MyISAM supports mysqlcheck's repair feature.
If you'd like to convert the table from InnoDB to MyISAM, run: 
ALTER TABLE tablename ENGINE=MyISAM;

I checked mySQL DB, and it is type: InnoDB. So should I convert it to MyISAM?? I really don't want to make my DB different from all the other WordPress MySQL databases.. but if this is the only way to repair it, I might have to do that?

What does this error do anyway?? As I said before, the DB appears to still be working properly? Can I just leave it as it is???

Dawn Foster
Dawn Foster
1,899 Points

Zac Gordon - Can I send the mysql_error.log to you in private chat?