1.     在安装mysql的文件目录中找到配置文件my.ini  ,然后右击用记事本打开

2.     打开后,搜索mysqld关键字

找到后,在mysqld下面添加skip-grant-tables,保存退出。

PS:若提示不让保存时,可以将该文件剪切到桌面,更改保存后再复制到mySQL目录下

3.    保存后重启mySQL,

先要检查mysql服务有没有启动.

启动mysql服务,

(1) à右击  à  我的电脑  à管理 启动.

(2) 当用运行win +R   cmd

输入 net start mysql  启动mysql服务的时候出, “发生系统错误 5。拒绝访问”

的时候找到命令提示符  à右 击  à管理员身份运行

输入net start mysql  启动mysql服务

4.       输入mysql -u root -p就可以不用密码登录了,出现password:的时候直接回车可以进入。

5.       mysql> use mysql; 回车        Database changed(修改数据库)

6.       mysql> update user setpassword=password("123456") where user="root";  回车  重新设置密码(这里密码为”123456”)注意:别忘分号. Query OK, 2 rowsaffected (0.09 sec)  Rows matched: 2  Changed: 2 Warnings: 0

7.       mysql> flush privileges;  回车 刷新 Query OK, 0rows affected (0.00 sec)

8.       mysql> quitBye  退出

ps:在这里123456为新密码,用户可根据自己需要修改成自己的密码

9.       最后在刚才的my.ini这个文件中,把刚才加入的"skip-grant-tables"这行删除,保存退出再重启mysql服务就可以了。

登录mysql数据库出现 : ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ER或者忘记密码的更多相关文章

  1. CentOS 7.6下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES

    https://blog.csdn.net/sinat_35406909/article/details/79763782

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

    错误:ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) 原因 :登录帐户错误(ODB ...

  3. Mysql忘记密码:关于ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)的问题

    命令行登录mysql时,出现ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)的提示. ...

  4. ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: N O) MYSQL

    ERROR 1045 (28000): Access denied for user ODBC@localhost 刚使用mysql, 碰到这个问题.. C:\Program Files\MySQL\ ...

  5. win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...

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

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

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

    cmd mysql -h localhost -u root -p r然后报错 ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost ...

  8. mysql登录报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    在MySQL登录时出现Access denied for user 'root'@'localhost' (using password: YES) 拒绝访问 对于出现拒绝访问root用户的解决方案错 ...

  9. MySQL学习笔记——ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

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

随机推荐

  1. AngularJS(一)理论篇

    前言 大概今年春天的时候,自己对这个词产生了兴趣,那会只是简单的查了一下,并没有深入研究过这部分知识块,现在终于开始接触这些东西. 内容 AngularJS在web应用方面是一个非常完美的JavaSc ...

  2. CF1076C Meme Problem 数学

    Try guessing the statement from this picture: You are given a non-negative integer d . You have to f ...

  3. HDU6299 Balanced Sequence (多校第一场1002) (贪心)

    Balanced Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...

  4. docker容器时间不对及java程序时间不对解决

    使用docker容器部署的应用,会出现时间与主机不一致的情况 1. 容器时间与主机差8个小时:主机的与容器的/etc/localtime不一致 解决方法:挂载主机的/etc/localtime,如果没 ...

  5. 树莓派编译安装 FFmpeg(添加 H.264 硬件编解码器支持)

    说明 FFmpeg 是一套开源的音视频编解码库,有非常强大的功能,包括视频采集功能.视频格式转换等.众所周知视频编解码是一个非常消耗系统资源的过程,而树莓派自带了 H.264 的硬件编解码器,因此本文 ...

  6. 74th LeetCode Weekly Contest Preimage Size of Factorial Zeroes Function

    Let f(x) be the number of zeroes at the end of x!. (Recall that x! = 1 * 2 * 3 * ... * x, and by con ...

  7. SoapUI性能测试

    之前没发现SoapUI可以做性能测试,自己写了两个简单的例子,体验一下它的测试功能. 一.使用控件顺序执行 测试的框架如上图所示,一个TestCase包含Test Steps(具体的测试步骤),Loa ...

  8. python3 关键字和可变参数笔记

    """普及一下字典的知识""" # dict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First' ...

  9. Vi编辑器和Vim编辑器的区别及联系

    Vi和Vim它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅兼容vi的所有指令,而且还有一些新的特性在里面,vi使用于文本编辑,但是vim更适用于coding.vim的这些优势主要体现在 ...

  10. hadoop - hbase 单机版的安装部署

    1. 下载安装包. http://www.apache.org/dyn/closer.lua/hbase/ 选择版本,单机进入以下页面 2. tar xfz hbase-1.2.6-bin.tar.g ...