• Mac MySql更改原始密码


     1.下载好mysql后,打开终端

    ➜  tmp mysql -u root -p                   
    Enter password: 
    

     2.直接回车,进入mysql控制台,设置新密码  

      mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('你的新密码');
    

     3.退出重进,直接回车不输入密码,提示密码错误

    ➜  tmp mysql -u root -p
    Enter password: 
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    

     4.输入刚刚设定的密码,成功进入

    ➜  tmp mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 12
    Server version: 5.7.27 Homebrew
    
    Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> show databases
        -> ;
    +------------------------------+
    | Database                     |
    +------------------------------+
    | information_schema           |
    | commerce_backend_development |
    | commerce_backend_production  |
    | commerce_backend_test        |
    | mysql                        |
    | performance_schema           |
    | sys                          |
    +------------------------------+
    7 rows in set (0.01 sec)
    

      

      

  • 相关阅读:
    1009 说反话 (20 分)
    1007 素数对猜想 (20 分)
    Visual Studio2017下载方法
    百词斩和扇贝打卡测试与评估
    创建者模式->工厂模式
    STM32F427|----------IO讲解与应用
    MySQL的索引
    STM32F103RCt6 与 MG996R
    2020物联网实验室的考核题目
    初学数据库-MySQL&IDEA&Navicat
  • 原文地址:https://www.cnblogs.com/lwh-note/p/13404613.html
Copyright © 2020-2023  润新知