Starting
- mysql -u user -p passwd db < dumpfile
Database level
- show databases;
- create database db;
- drop database db;
- use db;
- grant perms on db.table to 'user'@'host';
- show tables;
Table level
- describe table;
- create table table (col type,...);
- alter table table add col type after col;
- alter table table drop column col;
- insert into table values (val,...);
- update table set col=val where col=val and col=val;
- delete from table where col=val and col=val;
- select col,... from table where col=val and col=val order by col [desc] limit num
- drop table table;
[next]