zoukankan      html  css  js  c++  java
  • ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 忘记mysql密码

    [root@mysql-db03 ~]# mysql -uroot -poldboy123
    Warning: Using a password on the command line interface can be insecure.
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    [root@mysql-db03 ~]# /etc/init.d/mysqld restart
    Shutting down MySQL.. SUCCESS!
    Starting MySQL. SUCCESS!
    [root@mysql-db03 ~]# mysql
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 1
    Server version: 5.6.36 Source distribution

    Copyright (c) 2000, 2017, 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> 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("123456") where user="root";
    Query OK, 4 rows affected (0.01 sec)
    Rows matched: 4 Changed: 4 Warnings: 0

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    mysql> ^DBye
    [root@mysql-db03 ~]# mysql -uroot -p123456
    Warning: Using a password on the command line interface can be insecure.
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.6.36 Source distribution

    Copyright (c) 2000, 2017, 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> ^DBye
    [root@mysql-db03 ~]#

  • 相关阅读:
    支付宝即时到账接口
    bootstrp-select插件使用
    仿百度收索模糊提醒
    web项目架构
    springmvc的图片上传与导出显示
    jsp前端实现分页代码
    eclipse内下载及配置maven插件(转)
    Maven pom文件常用配置,转载
    阶段回顾
    html涉及的技术梳理
  • 原文地址:https://www.cnblogs.com/dsab/p/8016265.html
Copyright © 2011-2022 走看看