一、密码
update mysql.user set authentication_string = password('123') where user = 'root' and host = 'localhost';
二、时区
show variables like '%time_zone';
set global time_zone = '+8:00';
flush privileges;
三、存储引擎
show engines;
CREATE TABLE ai
(
i bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (i)
) ENGINE = MyISAM
DEFAULT CHARSET = gbk;
alter table table_name engine = innodb;
四、建表相关
show create table ai \G;
show table status like 'table_name' \G;
check table table_name;
repair table table_name;
create table table_name
(
i smallint not null auto_increment
)engine=innodb;