zoukankan      html  css  js  c++  java
  • Mysql 服务器设置(修改密码)

    1:进入DOS命令 输入cd C:\Program Files\MySQL\MySQL Server 5.5\bin  

    2:输入 mysql -h 192.168******* -u root -p 回车(注意 -p后面不要写密码 也不要写“;”)

    Microsoft Windows [版本 6.1.7601]
    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
    
    C:\Users\pc>cd C:\Program Files\MySQL\MySQL Server 5.6\bin
    
    C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -h localhost -u root -p
    Enter password: ****
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 21
    Server version: 5.6.16 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2013, 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 |
    | mysql              |
    | performance_schema |
    | test               |
    +--------------------+
    4 rows in set (0.00 sec)
    
    mysql> use mysql;
    Database changed
    mysql> show tables;
    +---------------------------+
    | Tables_in_mysql           |
    +---------------------------+
    | columns_priv              |
    | db                        |
    | event                     |
    | func                      |
    | general_log               |
    | help_category             |
    | help_keyword              |
    | help_relation             |
    | help_topic                |
    | innodb_index_stats        |
    | innodb_table_stats        |
    | ndb_binlog_index          |
    | plugin                    |
    | proc                      |
    | procs_priv                |
    | proxies_priv              |
    | servers                   |
    | slave_master_info         |
    | slave_relay_log_info      |
    | slave_worker_info         |
    | slow_log                  |
    | tables_priv               |
    | time_zone                 |
    | time_zone_leap_second     |
    | time_zone_name            |
    | time_zone_transition      |
    | time_zone_transition_type |
    | user                      |
    +---------------------------+
    28 rows in set (0.00 sec)
    
    mysql> select password from user where user='root';
    +-------------------------------------------+
    | password                                  |
    +-------------------------------------------+
    | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
    +-------------------------------------------+
    3 rows in set (0.00 sec)
    
    mysql> update user set password=password('root') where user='root';
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 3  Changed: 0  Warnings: 0
    
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql>\q;
  • 相关阅读:
    swoole 安装方法 使用即时聊天
    git的介绍以及简单应用
    curl的应用
    linux下监听和同步代码配置
    mac skim 修改背景色
    php 编译安装的一个 configure 配置
    mac mysql error You must reset your password using ALTER USER statement before executing this statement.
    yii2 控制器里 action 大小写组合造成的路由问题
    warning : json_decode(): option JSON_BIGINT_AS_STRING not implemented in xxx
    redis 自启动脚本
  • 原文地址:https://www.cnblogs.com/wzq806341010/p/3012040.html
Copyright © 2011-2022 走看看