Archive

Archive for the ‘MySQL Tricks’ Category

MySQL Error 28 – How to Fix it

June 11th, 2008 No comments

Today when I tried to perform some MySQL tasks and got error 28. After several searches I found that this error means that no free space is left on server HDD. When I ran df command, I was very surprised, but my disk usage was 100% – so much that MySQL couldn’t even create a log file. It’s a strange thing I didn’t notice this before. I had to check MySQL when my blog’s categories have disappeared. I highly recommend to enable DirectAdmin disk usage warning as I eventually missed disk overuse on my VPS.

How To Repair And Optimize All Mysql Databases

May 15th, 2008 No comments

When I tried to create admin backup for DirectAdmin, I got the message that one of my MySQL databases has errors and these errors were propagated to my backup. I’d suggest this to DirectAdmin developers, as using a simple command should avoid such errors. There is a linux shell tool called mysqlcheck, that allows to check, repair and optimize mysql databases without stopping mysqld. I will show you its usage so you can run this command before creating any kind of backups.

mysqlcheck -uroot -ppass -Aor

Male sure to include MySQL root password for this operation. If you don’t know your root password, check DirectAdmin Help for information regarding it. Let’s describe used options in brief. -A tells us that all databases will be checked. -r – Repairs selected databases, -o – Optimizes selected databases. This simple operation will allow you to have only good databases in your backups. You may also add this operation to your root crontab to keep your databases optimized.