Showing running queries in MySQL

MySQL has a statement called "show processlist" to show you the running queries on your MySQL server. This can be useful to find out what’s going on if there are some big, long queries consuming a lot of CPU cycles, or if you’re getting errors like "too many connections".

Delete All Data in a MySQL Table

This article looks at how to delete all the data from a MySQL database table and how it affects auto incremental fields. The final section…

Formatting Dates and Times with MySQL

Dates and times are stored in MySQL in the format "YYYY-MM-DD" and "YYYY-MM-DD HH:MM:SS" which is not necessarily the format you want to display in your web page or application. There are two methods to reformat the date and time into the desired format.

phpMyAdmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL using a web browser and is one of the most active projects on Sourceforge.

Logging queries with MySQL

It is possible to log all queries done by the MySQL server. To enable MySQL logging, the MySQL manual indicates you should add –log[=file_name] when starting mysqld. This isn't really the best options, as most Linux distributions use init scripts to start up MySQL, and this means either modifying them, or calling mysqld from the command line, which isn't really the best way of doing this when the init scripts do the job of starting and stopping services so nicely. So instead, it is easier to modify the my.cnf file (located at /etc/my.cnf on many Linux distros) and add the logging option there.