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)

  • 相关阅读:
    PAT 1032 (未完成)
    PAT 1031
    PAT 1030
    将爬取到的数据存入数据框并导出
    XPath常见用法
    python 图表
    Protobuf在Unity中的通讯使用
    ProtoBuf在Unity中的使用
    Unity更新资源代码
    匿名函数
  • 原文地址:https://www.cnblogs.com/520qtf/p/8857057.html
Copyright © 2011-2022 走看看