#Database

- -
CREATE DATABASE db ; Create database
SHOW DATABASES; List databases
USE db; Switch to db
CONNECT db ; Switch to db
DROP DATABASE db; Delete db

#Table

- -
SHOW TABLES; List tables for current db
SHOW FIELDS FROM t; List fields for a table
DESC t; Show table structure
SHOW CREATE TABLE t; Show create table sql
TRUNCATE TABLE t; Remove all data in a table
DROP TABLE t; Delete table

#Proccess

- -
show processlist; List processes
kill pid; kill process

#Other

- -
exit or \q Exit MySQL session
Comments