说明:win7系统,已经装过一个安装版的mysql(服务没有启动),然后又安装了一个免安装版的mysql,然后启动该免安装版的mysql后,用root用户无法登陆(因为想着root用户默认密码是空,但是却无法登陆),如下所示:

D:\>cd D:\MySQL Server 5.1\bin

D:\MySQL Server 5.1\bin>mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

解决办法:
D:\MySQL Server 5.1\bin>mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.5.24 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

将密码重新设置(设为空)
mysql> set password for 'root'@localhost=password('');
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

再次以root用户(密码为空)则可以登陆:
D:\MySQL Server 5.1\bin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.5.24 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

我想出现这个原因,估计是因为我之前装的这个mysql,root用户密码修改了,不是非空了。

mysql-1045(28000)错误的更多相关文章

  1. mysql学习笔记1---mysql ERROR 1045 (28000): 错误解决办法

    mysql ERROR 1045 (28000): 错误解决办法 在启动mysql服务后,登陆mysql的窗口的时候,执行mysql命令,结果报错,没法登陆.   (在安装mysql和配置的时候,我是 ...

  2. 关于mysql ERROR 1045 (28000)错误的解决办法

    错误情景: 使用Navicat打开mysql的时候弹出错误框 错误代码: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' ( ...

  3. mysql ERROR 1045 (28000): 错误解决办法

    ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ERROR 1045 (28000 ...

  4. mysql登录时,ERROR 1045 (28000): 错误解决办法

    错误问题的描述: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ERROR 10 ...

  5. mysql 在登陆的时候出现error 1045 (28000): 错误解决办法

    错误显示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决方案: 1.找到配 ...

  6. 1.mysql ERROR 1045 (28000): 错误解决办法

    转自:https://www.cnblogs.com/jpwz/p/6061214.html ERROR 1045 (28000): Access denied for user 'ODBC'@'lo ...

  7. mysql学习笔记1---mysql ERROR 1045 (28000): 错误解决办法(续:深入分析)

    在命令行输入mysql -u root –p,输入密码,或通过工具连接数据库时,经常出现下面的错误信息,详细该错误信息很多人在使用MySQL时都遇到过. ERROR 1045 (28000): Acc ...

  8. mysql开启skip-name-resolve 导致root@127.0.0.1(localhost)访问引发的ERROR 1045 (28000)错误解决方案

    为什么配置skip-name-resolve? 由于mysql -h${ip} 远程访问速度过慢, mysql -uroot -p123456 根据网友经验(https://www.cnblogs.c ...

  9. mac下mysql 1045 (28000): Access denied for user 'root'@'localhost' (using password:

    新入了mac pro,安装好mysql后,用终端进入mysql遇到个问题: 1045 (28000): Access denied for user 'root'@'localhost' (using ...

  10. 登录MySQL提示ERROR 1045 (28000)错误解决方法

    今天,登录服务器准备修改数据库的一些东西.但输入密码,却进不了数据库并提示一个错误,如下图 再确认密码没错的情况下,还是进不了数据库.便在网上找到了解决方法,记录下来,供参考学习. 解决方法: 总体思 ...

随机推荐

  1. java enum 用法

    /* * Hibernate, Relational Persistence for Idiomatic Java * * Copyright (c) 2010, Red Hat Inc. or th ...

  2. Spring整合Redis时报错:java.util.NoSuchElementException: Unable to validate object

    我在Spring整合Redis时报错,我是犯了一个很低级的错误! 我设置了Redis的访问密码,在Spring的配置文件却没有配置密码这一项,配置上密码后,终于不报错了!

  3. 微信小程序 - 自定义swiper dots样式(非组件)

      自定义须知: :组件内无法使用自定义样式变化,需要自定义 :原理就是利用swiper change事件与下标index匹配,显示不同的样式 swiper组件须知: :一旦swiper用于组件化,就 ...

  4. 微信小程序 - ios不能播放背景音乐

    由以下原因导致的 1. 未设置标题(backgroundPlayer.title)或标题为空 2. url只能英文,不能出现空格以及其它字符(中文.韩文.日文等)- iOS要求英文路径

  5. 使用Spring框架入门三:基于XML配置的AOP的使用

    一.引入Jar包 <!--测试1使用--> <dependency> <groupId>org.springframework</groupId> &l ...

  6. 跟踪 Ring3 - Ring0 的运行流程

    理论知识 SYSENTER 指令是在 Inter Pentium(R) Ⅱ 处理器上作为"高速系统调用"功能的一部分被首次引用的. SYSENTER 指令进行过专门的优化,能够以最 ...

  7. CentOS7系统64位下搭建Python3.6环境及相关细节工具部署文章收集

    (1)http://blog.csdn.net/chen798213337/article/details/70767902 问题描述: 安装Navicat管理数据库时,启动界面出现乱码情况. 解决办 ...

  8. 如何进入docker容器

    http://blog.csdn.net/u010397369/article/details/41045251

  9. 代码实现分析mpeg-2文件

    1.概述 把上一篇文章中讲到的mpeg-2文件结构分析用代码实现,结合mpeg-2文件分析.才easy看懂. 2.代码 /* *本程序主要分析MPEG-2文件 *作者:缪国凯(MK) *8214860 ...

  10. DNS服务器的维护与故障排除

    1. DNS故障诊断的常用工具或命令 诊断DNS解析故障的四个常用命令工具: ①unbound-checkconf:用于检查unbound服务器配置文件的语法错误 ②unbound-control:是 ...