命令行登录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. 4412 4路pwm输出

    一.4412 xpwmTOUT1 这是4412的GPD0_1路,itop中被使用为LCD的背光电路的pwm功能.因此如果使用教程中的代码,同样操作GPD0_1是行不通的. 会出现错误,所以需要解除在内 ...

  2. delphi WaitForSingleObject 示例之一等待另一个进程的结束

    <pre>unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Cont ...

  3. XScreenSaver强大的锁屏工具

    source install:  https://www.jwz.org/xscreensaver/ XScreenSaver     Related articles DPMS Xresources ...

  4. linux 命令参数列表过长以及find用法

    1.在一个目录下删除大批量的文件时,当使用 rm -rf 或者rm *会提示参数列表过长   通过修改命令为 :find . -name "*" | xargs rm -rf '* ...

  5. 测开之路二十:比较v1和v2

    根据V1和V2的版本号,如果v1>v2,返回1,如果v1<v2,返回-1,除此之外返回0 # 如果v1>v2,返回1,如果v1<v2,返回-1,除此之外返回0v1 = inpu ...

  6. PAT_A1069#The Black Hole of Numbers

    Source: PAT A1069 The Black Hole of Numbers (20 分) Description: For any 4-digit integer except the o ...

  7. Cocos2d-x之Log输出机制

    |   版权声明:本文为博主原创文章,未经博主允许不得转载. 在cocos2d-x中,我们使用log这个函数进行输出,log可以输出很多参数,它的使用方式就和使用c语言中的printf的使用方式差不多 ...

  8. HDU 6464 /// 权值线段树

    题目大意: 共Q次操作 操作有两种 操作一 在序列尾部加入f[i]个s[i] 操作二 查询序列第f[i]小到第s[i]小之间的总和 离线操作 把序列内的值离散化 然后利用离散化后的值 在线段树上对应权 ...

  9. Nacos-服务注册地址为内网IP的解决办法

    最近在使用Spring Cloud Alibaba这一套微服务解决方案,但是在服务注册的时候,网关死活找不到微服务地址,自己的微服务通过网关怎么也访问不到. 查找原因 仔细一查才发现,网关去访问了一个 ...

  10. 2018-8-10-git-push-错误-hook-declined-

    title author date CreateTime categories git push 错误 hook declined lindexi 2018-08-10 19:16:52 +0800 ...