Linux相关 MySQL相关

wget  # 后面加网址,下载文件到home下mysql

yum  # 源操做,install,update,removesql

cd   切换文件夹spa

su  切换root用户code

sudo  用管理员权限执行排序

reboot  # 重起rem

ls  # 查看当前目录下全部文件,文件夹get

 

 

Mysql:8.0的命令:it

create    # 增长io

selcet    # 查看table

show    # 查看

update    # 更新

drop    # 放弃(删除)

delete    # 删除

from    # 来自

where    # 条件

group by    # 分组

distinct    # 去重

having    # 过滤  

order by    # 排序  默认从小到大

limit    # 显示条数

desc table;  # 查看表结构

show  create  table;  # 查看表结构

 

执行顺序(优先级):from  where  group by  select  distinct  having  order by  limit

 

validate_password.policy    # 密码强度0 or LOW,1 or MEDIUM2 or STRONG

validate_password.length    # 密码长度,最小值为4位

set global validate_password.policy=0;    # 设置密码强度

set global validate_password.length=1;    # 设置密码长度(最低四位)

select @@validate_password.policy;    # 查看密码强度级别

select @@validate_password.length;    # 查看密码长度

select user from mysql.user;      # 查看全部用户

select hser, host from mysql.user;  # 查看全部用户

drop 'username'@'password';    # 删除用户

 

select version();      # 查看mysql版本

select new();        # 查看当前日期时间

alter table 表A名 add foreign key (在哪一列添加) references 表B名(表B被添加的列) on update cascade;    # 为表增长外键并(级联更新)

相关文章
相关标签/搜索