ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password:NO)
转自:http://blog.sina.com.cn/s/blog_586a1f3e01000b82.html
刚使用mysql, 就老是碰到这个问题,真是郁闷, 终于找到原因..
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (usingpassword: N
O)
解决方法:
Step 1:
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -u root-p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 28 to server version:5.0.24a-community-nt
Type 'help;' or '\h' for help. Type '\c' to clear thebuffer.
Step 2:
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
mysql>status
正常使用....
------------------------------------------------
我的系统是ubuntu6.06,最近新装好的mysql在进入mysql工具时,总是有错误提示:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using password: NO)
使用网上介绍的方法修改root用户的密码:
# mysqladmin -uroot -p password 'newpassword'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password:YES)'
现在终于被我找到了解决方法,如下(请先测试方法三,谢谢!):
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking&
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') whereUSER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD('newpassword') whereUSER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法三:
这种方法我没有进行过测试,因为我的root用户默认密码已经被我修改过了,那位有空测试一下,把结果告诉我,谢谢!!
# mysql -uroot -p
Enter password:<输入/etc/mysql/debian.cnf文件中[client]节提供的密码>
至此,困惑多时的问题解决了!
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password:NO)的更多相关文章
- 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\ ...
- 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 ...
- 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 ...
- 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)的提示. ...
- 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 ...
- 密码正确 mysql无法登陆 red7.3 上安装mysql5.6后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passswd :yes)
集群需要mysql存储元数据,就在前几天还运行好好的,突然就进不去了......还是太菜,遇到的bug少. 引起这种故障的原因有很多......第一个坑比较多,大部分用户也就用第一个就可以解决问题,我 ...
- mysql ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)错误解决办法
我的电脑是win10,所用的是mysql5.7.14 近期在学习mysql数据库的时候,遇到了这个错误,我的密码错误了.突如其来的问题,很是蒙蔽,因为我没对数据库设置过密码.通过网上查询,可以通过进入 ...
- ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)
windows下,以上两个错误的解决方法 工具/原料 windows 8 MySql 方法/步骤 找到配置文件my.ini ,然后将其打开,可以选择用记事本打开 打开后,搜索mysq ...
- 登录mysql数据库出现 : ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) ER或者忘记密码
1. 在安装mysql的文件目录中找到配置文件my.ini ,然后右击用记事本打开 2. 打开后,搜索mysqld关键字 找到后,在mysqld下面添加skip-grant-tabl ...
随机推荐
- Ajax 響應
獲取服務器的響應內容,可以使用responseText或者responseXML屬性 responseText:獲取字符串形式的相應內容,除了XML的響應內容以外可用 responseXML:獲取XM ...
- inf
下确界 inf,表示下确界,英文名infimum. 对于函数y=f(x),在使f(x)大于等于M成立的所有常数M中,我们把M的最大值max(M)(即函数y=f(x)的最小值)叫做函数y=f(x)的下确 ...
- codeforces279B
Books CodeForces - 279B When Valera has got some free time, he goes to the library to read some book ...
- BZOJ3524[Poi2014]Couriers——主席树
题目描述 给一个长度为n的序列a.1≤a[i]≤n.m组询问,每次询问一个区间[l,r],是否存在一个数在[l,r]中出现的次数大于(r-l+1)/2.如果存在,输出这个数,否则输出0. 输入 第一行 ...
- APICloud之封装webApp
注册用户 https://www.apicloud.com/ 使用步骤 进入开发控制台 创建应用 选择webApp 根据自己的情况填写信息,然后创建即可 应用创建后的界面 端设置 app界面设置 证书 ...
- day28 property 装饰器
方法属性装饰器 本质上来说就是将方法的执行括号去掉,这样将一个方法掩饰成了一个变量名字,变成了类似属性的东西内置装饰器函数,只在面向对象中使用 from math import pi class Cr ...
- 码云平台IDEA系列的插件使用
一.IDEA插件安装 file -- setting -- Plugins -- 搜索gitee -- Search in repositories 安装后重启编译器 二.登录并拉取项目 file ...
- Linux 下统计Apache每分钟的并发数
脚本非常简单,不清楚原理,逐行运行即可. 使用时将脚本复制到home目录,并添加执行权限.定时任务即可. 代码内容如下: #!/bin/sh date >> /home/date-time ...
- [UVALive 3661] Animal Run
图片加载可能有点慢,请跳过题面先看题解,谢谢 附:中文题面,[BZOJ1001]狼抓兔子 就要考联赛了,博客里题目的\(style\)都变了,几乎都是些套路啥的,这道题也比较套路 第一眼看这道题的感觉 ...
- 【BZOJ4738/UOJ#276】汽水(点分治,分数规划)
[BZOJ4738/UOJ#276]汽水(点分治,分数规划) 题面 BZOJ UOJ 题解 今天考试的题目,虽然说是写完了,但是感觉还是半懂不懂的来着. 代码基本照着\(Anson\)爷的码的,orz ...