zoukankan      html  css  js  c++  java
  • MySQL57修改root密碼

    之前在電腦里安裝了MySQL57之后,一直沒用,卻忘記了root密碼,

    在網上找了一些資料修改root密碼,卻一直出錯。直到試到這個:

    用管理員權限打開CMD

    CD C:Program FilesMySQLMySQL Server 5.7in

    net stop mysql57

    mysqld --skip-grant-tables

    再另外打開一個管理員權限的CMD

    CD C:Program FilesMySQLMySQL Server 5.7in

    mysql

    mysql> use mysql

    mysql> update mysql.user set authentication_string=PASSWORD('yourpassword') where user='root';

    mysql> flush privileges;

    mysql> quit
    Bye

    OK,用新密碼登陸即可:

    C:Program FilesMySQLMySQL Server 5.7in>mysql -u root -p
    Enter password: ************
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 10
    Server version: 5.7.15 MySQL Community Server (GPL)

    Copyright (c) 2000, 2016, 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>

  • 相关阅读:
    P3241 [HNOI2015]开店 动态点分治
    P4199 万径人踪灭 FFT + manacher
    P4173 残缺的字符串
    P3338 [ZJOI2014]力
    CF1005F Berland and the Shortest Paths
    CF567E President and Roads
    P2446 [SDOI2010]大陆争霸
    CF1082G Petya and Graph
    CF1082E Increasing Frequency
    直接查数据导出xls
  • 原文地址:https://www.cnblogs.com/keepee/p/9409738.html
Copyright © 2011-2022 走看看