August 21, 2009, 1:41 pm

For users who had disabled or turned off post revisions tracking or versions history feature in WordPress (added since WordPress 2.6), it is also made sense to delete and remove all existing stored post revisions and changes made on pages stored in the database in order to reduce the wp_posts table size, especially when there is already tons of revisions or changes been kept.
Continue reading ‘How to Delete Existing WordPress Post Revisions Stored/Saved’ »
July 30, 2009, 1:57 pm

opinion.tuxtraining.com is(was) a separate wordpress instance as it really does have little to do with this site and I wanted a degree of separation. I did not want user accounts at that site, nor did I wish to run ads. It’s more for my own amusement than anything and definitely has nothing to do with Linux tutorials and howtos.
Well I neglected it for far too long, it did not have akismet installed , and so when I logged in I had 2000+ spam comments waiting for me. Now I wasn’t about to delete 100 pages of comments manually one page at a t ime through the wordpress interface.
So this is what you do:
Log into your webhost and open up mysql, do a use <databasename> to switch to the appropriate database and issue the following command:
mysql> DELETE FROM wp_comments WHERE comment_approved = ‘0′;
Any comment that has not been approved will now be deleted.
June 4, 2009, 5:01 pm

Occasionally, under circumstances involving high load on the server, multiple INSERTs and UPDATEs, coupled with many SELECTs (see Section 28.5 for the syntax of SQL code), or hardware failure, your database server may corrupt a table. This is something it shouldn’t happen, but of course this doesn’t help you if it does. According to the MySQL manual on Corrupted MyISAM Tables, you can get corrupted tables if some of the following things happens:
- The mysqld process being killed in the middle of a write.
- Unexpected shutdown of the computer (for example, if the computer is turned off).
- A hardware error.
- You are using an external program (like myisamchk) on a live table.
- A software bug in the MySQL or MyISAM code.
and the typical symptoms for a corrupt table are:
Continue reading ‘How to repair a corrupt table in MySQL’ »
April 22, 2009, 2:10 pm

Software installed and functioning by the end of this walk through :
- FreeBSD 7.1
- Apache 2.2
- PHP 5.2.8
- MySQL 6.0.9
First off grab a copy of FreeBSD 7.1 from http://www.freebsd.org/where.html
Once you have FreeBSD installed we can start.
Continue reading ‘How to setup a FAMP (FreeBSD, Apache, MySQL & PHP) server’ »
February 25, 2009, 7:39 am

mtop allows you to monitor your MySQL instance in real-time. It shows you uptime of the instance, number of queries executed per second, slow queries, number active threads, etc.
If on Ubuntu/Debian: sudo apt-get -y install mtop
Use following command to watch your MySQL server stats with 1 second refresh interval.
mtop -se 1
November 13, 2008, 1:28 pm
November 12, 2008, 12:07 pm

If you get the following error, it means that mysqld has received many connect requests from the host 'host_name' that have been interrupted in the middle:
Host 'host_name' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'
Continue reading ‘What to do in MySQL if ‘host_name’ is blocked’ »
October 29, 2008, 9:11 am

If you are suddenly receiving a lot of request within a short period of time because you’ve been linked by a large site like Digg or Slashdot, your hosting solution might not be able to handle the load.
This article should help your to prepare your WordPress blog for such a case or if you’re just using a slow webhost and want to improve the general performance.
Continue reading ‘Make Wordpress Load Much Faster’ »
October 26, 2008, 11:36 am

By default, MySQL Server will be installed with root superuser without any password. You can connect to MySQL server as root without requiring password or by keying in blank password. However, if you have set the password for root and forget or unable to recall the password, then you will need to reset the root password for MySQL.
Continue reading ‘Recover MySQL Database root password’ »
September 1, 2008, 5:45 pm

- Login to the FreeBSD system as root, or su – root to get to super user environment.
- Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command):
- Continue reading ‘Install MySQL on FreeBSD via Ports Collection’ »