<code>mysql5.7后user表下的password字段改为了authentication_string</code>

假如你的root没有密码,你希望将密码改成123456,执行
假如你的root有密码,你希望将密码改成123456,执行:
show databases;
use 库名;
select database();
create database 库名;
show tables;
drop database 库名;
新建表
<code>create table 库名.表名( 字段名1 字段类型(宽度) 约束条件, 字段名2 字段类型(宽度) 约束条件, 字段名N 字段类型(宽度) 约束条件 )</code>
<code>mysql> create table test.study1( -> name char(20), -> age int);</code>
表
desc 表名;
select * from 表名;
drop table 表名;
记录管理命令
insert into 表名 values(值列表);
<code>mysql> insert into study1 values('liuneng',21),('zhaosi',22);</code>
update 表名 set 字段=值;
<code>mysql> update study1 set age=30; #所有人的age都改为30 mysql> update study1 set age=25 where name='huanhuan'; #将huanhuan的age改为25</code>
delete from 表名;
<code>mysql> delete from study1 where name='zhaosi'; #删除zhaosi的记录 mysql> delete from study1; #删除表中所有的记录</code>