mysql登录遇到ERROR 1045问题解决方法
时间:2024-01-22 15:09:57
在Windows系统中,mysql登录的时候出现了这样的错误:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
从网上找了一些办法,终于得到了解决,现在记录一下具体的解决方法:
c:\>sc stop mysql
c:\>mysqld --defaults-file="C:\MySQL\MySQLServer6.0\my.ini" --console --skip-grant-tables
重新开一个cmd
c:\>mysql -uroot -p
enter password: <- 回车
mysql>UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit
标签:mysql,登录
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
利用Python脚本批量生成SQL语句
2023-06-10 10:02:37
![](https://img.aspxhome.com/file/2023/2/103512_0s.jpg)
django认证系统 Authentication使用详解
2021-10-02 19:05:07
mysql 获取规定时间段内的统计数据
2024-01-24 11:25:10
使用php操作xml教程
2023-06-14 03:10:45
![](https://img.aspxhome.com/file/2023/0/55570_0s.png)
描述性列表的表现形式
2008-09-17 13:43:00
将Python的Django框架与认证系统整合的方法
2022-05-09 20:33:15
Python实现动态条形图的示例详解
2021-05-18 13:40:38
![](https://img.aspxhome.com/file/2023/5/128515_0s.gif)
PHP fprintf()函数用法讲解
2023-06-01 20:09:20
![](https://img.aspxhome.com/file/2023/8/55388_0s.png)
golang实现sql结果集以json格式输出的方法
2024-04-27 15:33:05
PHP单例模式简单用法示例
2023-11-18 19:45:41
GoFrame框架gset使用对比PHP Java Redis优势
2023-11-24 04:08:58
![](https://img.aspxhome.com/file/2023/5/107345_0s.png)
SQL Server TEXT、NTEXT字段拆分的问题
2008-10-26 12:28:00
通过python连接Linux命令行代码实例
2023-01-25 23:10:33
python下载图片实现方法(超简单)
2021-12-21 02:17:07
PyGame实现初始化导入所有模块方法详解
2023-05-25 15:14:55
![](https://img.aspxhome.com/file/2023/4/120354_0s.png)
Python数据分析与处理(一)--北京高考分数线统计分析
2022-08-13 02:11:05
![](https://img.aspxhome.com/file/2023/0/88970_0s.jpg)
Python画图常用命令大全(详解)
2023-04-17 15:20:16
![](https://img.aspxhome.com/file/2023/0/110240_0s.jpg)
python之array赋值技巧分享
2021-11-23 17:16:55
python读取txt文件中特定位置字符的方法
2022-07-02 17:38:52
Python time三种时间转换小结
2022-05-15 18:38:20
![](https://img.aspxhome.com/file/2023/5/131465_0s.jpg)