create user testUser@'%' identified by 'TEST';
'%' 能夠過程訪問 mysql
TSET.* : TEST 數據庫的全部表sql
grant all on TEST.* to userTEST@'%';
mysql test</root/dump.sql
導出數據表結構 及數據 數據庫
mysqldump -u username -p test>/usr/test.sql
建立索引ide
alter table uses add index user_sex_index(sex) comment 'uses 表中的 sex 索引';
show create table offices
alter table offices modify office_name varchar(30) not null comment '科室名稱';
ALTER TABLE user_froms CONVERT TO CHARACTER SET utf8;
ALTER TABLE user_froms DEFAULT CHARACTER SET utf8;