How to view your MYSQL databases nicely formatted in the command line

So some real basic stuff
Login to your mysql

$ mysql -u yourusername -p

Enter your mysql password when prompted

Look at your databases, remember in mysql end the line with a semi colon. ;

mysql> show databases;

Then you can “use” the database you want.

mysql> use nameofdatabase;

Now for the cool part, how do you look at the table’s and the values in them? This is a WordPress database and let’s look at the wp_options table.

mysql> pager less -SFX;
mysql> select * from wp_options;

You then get this awesome view that lets you use the arrow keys to move up, down, left, right. The letter q will close it.

+-----------+------------------------------------------------------------------+-------------------------------------------------
| option_id | option_name                                                      | option_value
+-----------+------------------------------------------------------------------+-------------------------------------------------
|         3 | siteurl                                                          | http://localhost/wordpresssite
|         4 | blogname                                                         | Some Website
|         5 | blogdescription                                                  | Some Website
|         6 | users_can_register                                               | 0
|         7 | admin_email                                                      | email@somesite.com
|         8 | start_of_week                                                    | 1
|         9 | use_balanceTags                                                  | 0
|        10 | use_smilies                                                      | 1