zoukankan      html  css  js  c++  java
  • mysql 权限

    grant all on *.* 
    grant 权限 on 数据库.表 to 用户@'ip地址' identified by '密码';
    刷新授权表 flush privileges
        csh.qtf
                   csh.*

    grant all on *.*    to user1@'192.168.1.%' identified by '密码';
    grant select on *.*   to  user1@'192.168.1.%' identified by '密码';
    grant select,insert,delete,update on *.*     user1@'192.168.1.%' identified by '密码';

    修改用户密码:
    mysql> update user set password=password('123456') where user='root';


    查看用户信息
    use mysql
    select User,Host,Password from user;       #查看用户信息
    show grants for 用户@'ip地址';                 #查看授权信息

    grant all on *.* 
    grant 权限 on 数据库.表 to 用户@'ip地址' identified by '密码';
    刷新授权表 flush privileges
        csh.qtf
                   csh.*

    grant all on *.*    to user1@'192.168.1.%' identified by '密码';
    grant select on *.*   to  user1@'192.168.1.%' identified by '密码';
    grant select,insert,delete,update on *.*     user1@'192.168.1.%' identified by '密码';

    查看用户信息
    use mysql
    select User,Host,Password from user;       #查看用户信息
    show grants for 用户@'ip地址';                 #查看授权信息

    revoke 权限  on *.*   from user1@'192.168.1.%';
    revoke select,insert,delete,update  on *.*   from user1@'192.168.1.%';
    flush privileges;
    show grants for user1@'192.168.1.%';

    revoke SELECT, INSERT ON `csh`.*  from 'cshuser'@'192.168.31.9' ;

    删除无效用户;
    select user,host from user;查询用户

    delete from user where User='user1';

    mysql -u用户 -p密码
    show databases;
    use 数据库名;
    例如: use  mysql;
    desc user;


    mysql> grant select on usvn.* to usvnuser@'192.168.2.251' identified by 'usersvnpwd';
    Query OK, 0 rows affected (0.01 sec)

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

  • 相关阅读:
    harbor 报错,注意harbor.yml文件格式。
    nginx中rewrite文件
    改善github网络连接
    代码层实现六种质量属性战术
    读漫谈架构有感
    “淘宝网”的六个质量属性的六个常见属性
    寒假学习进度16:tensorflow2.0 波士顿房价预测
    寒假学习进度15:tensorflow2.0 优化器
    寒假学习进度14:对mnist数据集实现逻辑回归
    寒假学习进度13:tensorflow2.0 mnist简介
  • 原文地址:https://www.cnblogs.com/520qtf/p/8857057.html
Copyright © 2011-2022 走看看