So far, the article I’ve learned the most from in this year’s edition of PHP Advent is PHP Advent 2008 / MySQL Client Tips. Did you know you can use your favorite text editor from the mysql command line client? Or get help on the syntax for SQL commands? I didn’t before reading this article, and I prefer using the command line interface whenever possible. Every developer should be familiar with it, one day you’ll have to diagnose a poorly executing query without phpMyAdmin.
The mysql client is an interactive command-line client that works directly with your MySQL server. Many PHP developers prefer to use phpMyAdmin, a web-based client, when working with MySQL. It is easy and rather intuitive to use, doesn’t require you to know much SQL to fetch information, and is a whole lot less intimidating than a blank command prompt blinking at you. It is an application that sits between you and the database, providing a layer of abstraction. Sometimes that extra layer gets in the way. Sometimes, you need information that is not readily available from phpMyAdmin. Enter the mysql client.