Category Archives: MySQL

MySql woes

We’ve got MySql problems here at Geekrant central.

MySQL said: Documentation
#1016 – Can’t open file: ‘wp_comments.MYI’ (errno: 145)

Doesn’t sound good, does it? The ISP is looking into it.

Nothing else seems to be AWOL, but I’ve taken a backup of everything just in case. Wouldn’t you know it, the backup I have of wp_comments isn’t particularly recent. Hopefully the ISP has a newer one, but if not, I’ve grabbed a bunch of comments via Newsgator’s cache. Gawd knows how I’d restore them though.

Update: Fixed. May I just say, the support guys at AussieHQ hosting are deadset legends.

WordPress Most comments

Here’s the SQL to find which of your WordPress posts have the most comments:

SELECT wp_comments.comment_post_id, count(*) as commentcount, wp_posts.post_title, wp_posts.post_date FROM wp_comments, wp_posts
where wp_comments.comment_post_id = wp_posts.ID
group by wp_comments.comment_post_id, wp_posts.post_title, wp_posts.post_date
order by commentcount desc

Another MySQL GUI

A while ago I downloaded a cross platform DB manager, DB Tools Manager Professional. It works great for local databases but was painfully slow accessing remote MySQL installs. Daniel came across MySQL Administrator, a smooth Windows GUI for MySQL from the very same people that release MySQL. It seems to be as fast with remote access as it is with local and so far I’m impressed.

Sitepoint Anomaly

I’ve been meaning to buy a couple of books from sitepoint for a while now. I’ve borrowed a copy of their HTML Utopia: Designing Without Tables Using CSS, a fantastic guide to CSS and their Build Your Own Database Driven Website Using PHP & MySQL looks great so when they emailed me an offer of 20% off this book I thought why not.

That is until I saw the site. Ifyou spend over USD$70 (effectively two books) you get free postage anywhere in the world. Hmmm. Take the offer and save $7 off one book or reject the offer (which takes me below $70), pay full price and save $15?

Regardless, they’re great books.


I’ve recently moved my web site development from Windows/ASP to Linux/PHP/MySQL. I’m a child of the GUI generation so I went looking for a cheap GUI for MySQL. I found better than cheap – I found free.

DBMananger allows you to manage MySQL, PostgreSQL, Interbase/Firebird, SQLite, Xbase, MSAccess, MSSQL Server, Sybase and Oracle. I’ve used it once to get the database for up and running and so far it’s doing all I asked for. It uses your standard SQL manager layout so there’s little, if any, learning curve and as a newcomer to MySQL that’s a bonus for me.

I’m about to launch in to a much more ambitious project so I’ll be able to give a fuller review once that’s done.