zoukankan      html  css  js  c++  java
  • Mysql 管理

    Mysql 8

      windows版mysql8.0安装详解

      创建用户

      create user 'test1'@'localhost' identified by '‘密码';

      flush privileges;刷新权限

      其中localhost指本地才可连接

      可以将其换成%指任意ip都能连接

      也可以指定ip连接

      修改密码

      Alter user 'test1'@'localhost' identified by '新密码';

      flush privileges;

      授权

      grant all privileges on *.* to 'test1'@'localhost' with grant option;

      with gran option表示该用户可给其它用户赋予权限,但不可能超过该用户已有的权限

      比如a用户有select,insert权限,也可给其它用户赋权,但它不可能给其它用户赋delete权限,除了select,insert以外的都不能

      这句话可加可不加,视情况而定。

      all privileges 可换成select,update,insert,delete,drop,create等操作

      如:grant select,insert,update,delete on *.* to 'test1'@'localhost';

      第一个*表示通配数据库,可指定新建用户只可操作的数据库

      如:grant all privileges on 数据库.* to 'test1'@'localhost';

      第二个*表示通配表,可指定新建用户只可操作的数据库下的某个表

      如:grant all privileges on 数据库.指定表名 to 'test1'@'localhost';

      查看用户授权信息

      show grants for 'test1'@'localhost';

      撤销权限

      revoke all privileges on *.* from 'test1'@'localhost';

      用户有什么权限就撤什么权限

      删除用户

      drop user 'test1'@'localhost';

    Mysql 7

      

  • 相关阅读:
    7人脸识别
    1图片视频文件操作基础
    3直方图与二值化,图像梯度
    6模板匹配(人脸匹配案例)
    基础习题
    碎片知识点整理
    详解:MySQL数据表损坏的正确修复方案
    前端开发:模块化 — 高效重构
    分享几个基于jQuery不错的前端相册展示插件代码
    程序员编程10年的心得和体会
  • 原文地址:https://www.cnblogs.com/jpinsz/p/12807729.html
Copyright © 2011-2022 走看看