zoukankan      html  css  js  c++  java
  • mysql5.7 修改密码,修改权限

    1.修改数据库对指定用户和ip权限

      a. IP为192.168.0.1的用户jack拥有对数据库datebase的表table的 增删改查权限, ,连接密码为password

     grant select,insert,update,delete,create,drop on database.table to jack@192.168.0.1 identified by 'password';
    

      b. 192.168.0.1的用户jack拥有对数据库datebase所有表的所有操作权限,连接密码为password

    grant all privileges on datebase.* to jack@192.168.0.1 identified by 'password';

      c. 192.168.0.1的用户jack拥有对所有数据库所有表的所有操作权限,连接密码为password 

    grant all privileges on *.* to jack@192.168.0.1 identified by 'password';

    2.linux登录指定数据库

    mysql -P'port' -h'IP' -u'username' -p'password';

    3.修改数据库访问密码(mysql5.7以后mysql.user表中没有了password字段,而是使用authentication_string来代替)

    update mysql.user set authentication_string=password("new password") where User="username" and Host="localhost"; 
    flush privileges;
  • 相关阅读:
    makefile中宏定义
    make的静态模式
    makefile中两重if判断
    定义命令包
    嵌套执行make
    AcWing 1014. 登山
    AcWing 482. 合唱队形
    AcWing 1027. 方格取数
    AcWing 1016. 最大上升子序列和
    AcWing 187. 导弹防御系统
  • 原文地址:https://www.cnblogs.com/hcl1991/p/9564759.html
Copyright © 2011-2022 走看看