1.连接 mysql -u root -h localhost -p 2.建立数据库 create database test 3.建立数据表 create table if not exists test ( id int(10) not null primary key auto_increment comment ‘这里是注释’, subject varchar(20) not null ) engine=myisam default charset=utf8 comment=’表注释在这里’; 4.查看表 show tables; 5.查看表结构 desc test;(其中test是表明) 6.重新命名表 alter table test rename study;