Cheatsheet: MySQL
Template Values
Server operations
start a server
stop a server
open prompt/shell
specify port explicitly
execute command from a shell
execute command from a file
If installed with homebrew
start a server
stop a server
Create new database and user
open mysql prompt as root (password is empty)
create database
create user with a password
grant permissions to a db
check permissions
login as new user
Database operations
list all databases
use a database
list all tables
describe a table
query tables size information
See also: