How to tell if the MySQL Query Cache is enabled

The MySQL Query Cache enables query results to be cached so if the same query is run multiple times the second and subsequent times the query are run are amost instant. This short post shows how to tell if the MySQL Query Cache is enabled.

Cross Table Delete with MySQL

Deleting records with MySQL can be done by referencing records in another table with a cross join, allowing data to be deleted from one table based on values in another, or where there are no associated records in the other table.

Get a MySQL table structure with DESCRIBE

There are at least two ways to get a MySQL table’s structure using SQL queries. The first is using DESCRIBE and the second by querying the INFORMATION_SCHEMA. This post deals with the DESCRIBE function and next week I’ll look at the latter.

Get a MySQL table structure from the INFORMATION_SCHEMA

There are at least two ways to get a MySQL table’s structure using SQL queries. The first is using DESCRIBE (which I have already covered in an earlier post) and the second by querying the INFORMATION_SCHEMA. This post deals with querying the INFORMATION_SCHEMA which has more information available than using DESCRIBE.

PHP script to check MySQL replication status

If you have MySQL replication running in either a master-slave or master-master type setup then don’t assume everything is running perfectly all the time. Power cuts and other disasters do happen so you need to check periodically to ensure it’s all working. This post has a PHP script to check for any MySQL replication errors and then emails if there are any issues