• MYSQL修改用户密码


    第一种方法  
    将root的密码改为djg345  
    # mysqladmin -uroot -p123123 password djg345  
    以下方法需在mysql>提示符下操作  
    第二种方法 更改user01密码为user01pwd  
    mysql> SET PASSWORD FOR user01=PASSWORD("user01pwd");  
    
    
    mysql> show grants for test;
    +-----------------------------------------------------------------------------------------------------
    
    ---------------------------+
    | Grants for test@%                                                                                    
    
                              |
    +-----------------------------------------------------------------------------------------------------
    
    ---------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' IDENTIFIED BY PASSWORD 
    
    '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' WITH GRANT OPTION |
    +-----------------------------------------------------------------------------------------------------
    
    ---------------------------+
    1 row in set (0.00 sec)
    
    
    1.修改test用户密码为147258
    
    [mysql@master ~]$ mysqladmin -u test -p password 147258
    Enter password:   --这里输入的是原密码
    [mysql@master ~]$ 
    
    [mysql@master ~]$ mysql -utest -p147258
    
    
    2.第2种方式:
    --修改test用户密码为999999
    mysql> use mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> UPDATE user SET password=PASSWORD('999999') WHERE user='test';
    Query OK, 2 rows affected (0.00 sec)
    Rows matched: 2  Changed: 2  Warnings: 0
    
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> 

  • 相关阅读:
    leetcode 之Jump Game
    leetcode 之 Symmetric Tree
    leetcode 之 House Robber
    设计模式之建造者模式
    centos7 yum tab 补全
    设计模式之适配器模式
    设计模式之状态模式
    设计模式之外观模式
    设计模式之模板方法模式
    对以<uses-permission android:maxSdkVersion="xx" /> 中的说明
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13351726.html
Copyright © 2020-2023  润新知