One-Liners

Select a Database

USE {{database_name}};

Show Databases

SHOW databases;

Show Tables

SHOW tables;

Show Columns in Table

SELECT column_name FROM information_schema.columns
WHERE table_name = '{{table_name}}';

Get History of Commands

cat ~/.mysql_history

Unhex Data

Some data is in hex format and you want to view it.

SELECT some_column, unhex(some_hex_column) FROM some_table;

Learning

https://www.youtube.com/watch?v=ycQ-wqlaEX8