MySQL Commands Cheat Sheet

Another memory-dump. The manual contains more information (that’s a surprise :-).

mysql> delete from TABLE where id=X
Removes the specified row
mysql> describe TABLE;
Shows the structure of the specified table
mysql> select * from TABLE;
Shows all rows in the specified table :-O
mysql> show procedure status;
Shows stored procedures
mysql> show table status;
Shows tables in current database
mysql> use MYDATABASE;
Changes the database to act on

MySQL 5 Stored Procedures Cheat Sheet

I will add more when I stumble upon commands I can’t remember the syntax of.

To list all stored procedures:


mysql> SHOW PROCEDURE STATUS;

Example output (with cropped dates and times for readable table):

Db Name Type Definer Modified Created Security_type Comment
mydb store_user PROCEDURE root 2007-0.. 2007-0.. DEFINER
mydb store_cart PROCEDURE root 2007-0.. 2007-0.. DEFINER
mydb store_settings PROCEDURE root 2007-0.. 2007-0.. DEFINER


Continue reading