====== MySQL command line – quick tips ====== ===== From Bash ===== ==== Login (localhost access) ==== mysql -u -p ===== From the MySQL command prompt ===== ==== List all databases on the current server ==== mysql> show databases; ==== Switch to a database ==== mysql> use ; ==== Show all tables in the currently selected database ==== mysql> show tables; ==== View a table’s schema ==== mysql> describe ; ==== Issue a select statement (example) ==== mysql> select * from
; ==== Limit number of rows returned in a select ==== //(TOP doesn’t work in MySQL…)// mysql> select * from
limit 0,10; {{tag>database}}