select user();
select database();
show engines;
show create table xxx;
show table status from anheisg;
show grants for username@host;
grant privileges on *.*(datebase.table) to username@host;
revoke privilege on *.* from ‘dw‘@‘%‘;
show master status;
show binlog events in ‘mysql_bin.000005‘;
desc table_name;
show columns from table_name;
show table status from anheisg;
创建表(例如):
CREATE TABLE IF NOT EXISTS
tt
(
id
int(10) unsigned NOT NULL AUTO_INCREMENT,
name
varchar(16) NOT NULL,
sex
enum(‘m‘,‘w‘) NOT NULL DEFAULT ‘m‘,
age
tinyint(3) unsigned NOT NULL,
classid
char(6) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop table table_name;
原文:https://www.cnblogs.com/liushi-Oscar/p/9577589.html