Tagged with MySQL

MySQL Ordering the Group By

A problem that I have faced with SQL many times is pre-ordering the GROUP BY clause.

When you GROUP BY, MySQL will return a set of records which I call representing records. These records represent the group that is selected.

For example select id from test group by class will return one representing record per unique value of the class field. The problem with this is that you have no control over which record will represent the group.


Monitor Multiple MySQL Servers using PHP

This is a quick 1 page application to monitor your replicated MySQL servers.

Use it as you will. Enjoy!


MySQL Backup Script

Here is what I use to make a backup library of MySQL daily that will keep backups for 30 days.


2-Way MySQL Replication

Some notes and commands I want to keep handy the next time I setup MySQL replication.