解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
来源:互联网 发布:jive论坛源码 编辑:程序博客网 时间:2024/05/17 20:30
网上看了好多,写的都不详细,特地补充。
安装了mysql ;
navicat可以链接,root密码正确
但是 cmd, 使用 mysql -u -root -p
输入正确的密码,提示下边内容;
1045 access denied for user 'root'@'localhost' using password yes
解决办法
1. 开始 -->cmd --> net stop mysql (停用MySQL服务 没启动的可以省略)
2. 找到安装路径 MySQL Server 5.1下的my.ini
我是在安装目录下直接搜索的,不确定哪一个,所以全部修改了;
3. 打开 my.ini 找到 [mysqld] 然后在下面加上
这句: skip_grant_tables (意思好像是 启动MySQL服务的时候跳过权限表认证 )
4.这里注意,关闭原来的cmd,重新打开cmd;
然后就启动数据库修改密码了
开始 --> cmd --> net start mysql (启动MySQL服务)---> mysql 回车 ( 如果成功,将出现MySQL提示符)
5. 输入use mysql; (连接权限数据库)。
6. 改密码:update user set password=password("123") where user="root";(别忘了最后加分号) 。
7. 刷新权限(必须步骤):flush privileges; 。
8. 退出 quit。
9. 将第3 步的 my.ini里的 skip_grant_tables 去掉(启动MySQL服务的时候不能让他跳过权限表认证 )
10. 重启MySQL ,再进入,使用用户名root和刚才设置的新密码123就可以登录了。
真的可以了。
真不容易。
网上一堆转来转去的,无力吐槽了。
就不能细心点?????
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- mysql忘记密码了1045,解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- root用户连接mysql数据库出错 1045 access denied for user 'root'@'localhost' using password yes
- windows mysql提示:1045 access denied for user'root'@'localhost' using password yes
- MySQL提示:1045 access denied for user 'root'@'localhost' using password yes
- Mysql登录提示1045 error:access denied for user 'root'@'localhost <using password: yes>
- MYSQL 提示:1045 access denied for user 'root'@'localhost' using password yes
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- windows mysql提示:1045 access denied for user'root'@'localhost' using password yes
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- Java中的设计模式
- 7.5 Hibernate:内置生成器 – identity
- Java用HttpsURLConnection访问https网站的时候如何跳过SSL证书的验证?
- Random取100以内的随机数
- 怎么转载 博客
- 解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- 16th 【并查集】亲属关系
- 贪心法-Fence Repair POJ
- iOS实时卡顿监控
- wireshark 抓包分析 TCPIP协议的握手
- leetcode69: Sqrt(x)
- centos docker安装与在线验证
- 【MyBatis学习08】高级映射之一对一查询
- 常见的浏览器兼容性问题