Doing More with phpMyAdmin (Part 2) - History Lesson (
Page 7 of 7 )
In the concluding section
of this tutorial, I will look at two features that at first glance seem too
trivial to discuss. However, they're both pretty useful, so let's take a look.
The first feature is phpMyAdmin's ability to keep track of all the SQL
statements that you have executed within the session. In fact, this is very
similar to a browser's history module, which stores all the Web sites that you
have visited in the recent past. You can access this history list by using the
SQL-history tab of the
Query window,
as
seen here.
There are a couple of parameters that you can use to
tweak for this interesting feature: the
$cfg['QueryHistoryMax']
variable sets the maximum number of queries to be stored in the history buffer
at any given point in time, while the
$cfg['QueryHistoryDB']
variable tells phpMyAdmin whether to store the history list in a MySQL database
or in JavaScript variables. If you choose the latter, the SQL history will be
lost as soon as the
Query window is closed. For all practical purposes, I
recommend using the database option to ensure that your queries are stored in
the history buffer for a longer duration.
Finally, phpMyAdmin allows you
to not only customize its colors, but also its language. So, regardless of
whether you're working in the freezing mountains of Siberia or struggling in the
desert sands of Egypt, you can be sure that phpMyAdmin will be able to display
the interface in your very own language.
To use this feature, simply
navigate to the homepage of the application and use the
Language
drop-down list to change the language.
Here's
what the result might look like.
If you're one of the unfortunate
few whose native language is not available in the drop-down list, don't despair:
the phpMyAdmin development team is looking for people to translate the interface
into other languages. Why not get in touch?
That's about it for this
two-parter on the phpMyAdmin database administration tool. While the first part
dealt with issues like installation, security, and analysis, I went a little
further in this second part. I explained how you can effectively leverage on the
interesting features offered by new versions of phpMyAdmin, beginning with a
discussion of the mechanism to define relationships between tables and how
phpMyAdmin can be used to ensure that bad data does not find its way into your
tables. Next, I explained the bookmarks feature, which lets you remember
important queries for future use, the procedure for generation of a database
dictionary in PDF format on the fly, and wrapped things up with a quick look at
the history and language capabilities of the application.
I hope you
enjoyed reading this tutorial as much as I enjoyed writing it, and that it gave
you some visibility of the true power and flexibility of phpMyAdmin. Until next
time!
Note: All examples in this article have been tested on MySQL
4.0.14. Examples are illustrative only, and are not meant for a production
environment. Melonfire provides no warranties or support for the source code
described in this article.