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(
idint(10) unsigned NOT NULL AUTO_INCREMENT,
namevarchar(16) NOT NULL,
sexenum(‘m‘,‘w‘) NOT NULL DEFAULT ‘m‘,
agetinyint(3) unsigned NOT NULL,
classidchar(6) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop table table_name;原文:https://www.cnblogs.com/liushi-Oscar/p/9577589.html