命令行登录mysql时,出现ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)的提示。查了不少教程,通过折腾找到下述解决方案:

  解决方法:

    1. 停掉mysql服务

    2. 找到mysql安装目录下的my.ini,找到里面的[mysqld] 然后在下面加上skip_grant_tables(启动MySQL服务的时候跳过权限表认证)

    3. cmd -> net start mysql -> mysql回车  成功登录后出现mysql提示符

    4. 输入use mysql (mysql的密码存在于mysql表中,因此打开该表)

    5. 修改密码:update user set authentication_string = password("新设置的密码") where user="root";(我这里mysql的版本是5.7,其中密码列的属性叫做authentication_string;5.1的是password);如果不清楚属性可以用phpmyadmin等插件进入查看

    6. 刷新权限:flush privileges;

    7. 退出:quit;

    8. 将my.ini中的skip_grant_tables去掉,恢复登录时候的权限表认证

    9. 重启mysql服务,再使用root和修改的密码登录即可:mysql -u root -p 新设置的密码

Mysql忘记密码:关于ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)的问题的更多相关文章

  1. 【转载】重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor ...

  2. Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...

  3. mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))

    mysql链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)) 修改: # ...

  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. 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 ...

  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 for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    出现报错: Warning: World-writable config file '/etc/my.cnf' is ignored // 该文件权限过高ERROR 1045 (28000): Acc ...

  9. Ubuntu下MySQL报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    在Ubuntu下 想要登录mysql数据库 root@JD:~# mysql -uroot -p 报错 ERROR 1045 (28000): Access denied for user 'root ...

随机推荐

  1. socket | tcp客户端 tcp服务器 udp客户端 udp 服务器 创建方法

    tcp服务器 #coding=utf-8 ''' 这里是tcp服务器端,要先启动 ''' import socket import threading bind_ip = "0.0.0.0& ...

  2. 配置github的pull request触发jenkins自动构建

    参照: https://www.cnblogs.com/zanjiahaoge666/p/6402738.html 之前的配置,都是向master分支push操作触发jenkins进行构建,但是在一般 ...

  3. cnn模型

    https://blog.csdn.net/qq_26591517/article/details/79805884

  4. cesium加载gltf模型

    cesium加载gltf模型 一.采用vue-cesium:在项目里加载依赖包.命令如下: npm i --save vue-cesium 在main.js中加入如下代码: https://www.n ...

  5. VC++DLL动态链接库程序

    VC++DLL动态链接库程序 VC++DLL动态链接库程序 C++ DLL 导出函数 使用VS2017等IDE生成dll程序,示例如下: C++ DLL 导出类 1.导出类中第一种方法:简单导出类(不 ...

  6. Redis 系列

    Redis 系列 [Redis 系列(01)安装配制] [Redis 系列(02)数据结构] [Redis 系列(03-1)进阶 - 发布订阅] [Redis 系列(03-2)进阶 - 事务] [Re ...

  7. c# Winform dev控件之ChartControl

    1.改变颜色 字体颜色 背景颜色 XYDiagram dia = chartControl1.Diagram as XYDiagram; dia.AxisX.Label.TextColor = Col ...

  8. POJ 3468 A Simple Problem with Integers(线段树,区间更新,区间求和)

    A Simple Problem with Integers Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 67511   ...

  9. Autofac基本使用

    原文:Autofac基本使用 AutoFac是.net平台下的IOC容器产品,它可以管理类之间的复杂的依赖关系.在使用方面主要是register和resolve两类操作. 这篇文章用单元测试的形式列举 ...

  10. Python基础篇(初始函数)

    Python初始函数: 一.什么是函数 1.我们到目前为止, 已经可以完成一些软件的基础功能了. 那么我们来完成这样一个功 能: 约x: print("拿出手机") print(& ...