设为首页 加入收藏

TOP

windows环境下出现Error 1045(28000) Access Denied for user 'root'@'localhost'解决方法
2018-03-14 09:00:31 】 浏览:173
Tags:windows 环境 出现 Error 1045 28000 Access Denied for user ' root' @' localhost' 解决 方法

windows环境下出现Error 1045(28000) Access Denied for user 'root'@'localhost'解决方法

1.先在安装目录找到my.ini配置文件,打开配置文件,找到[mysqld]一行,在下面添加skip-grant-tables后保存该文件,重新启mysql动服务。

2.然后在cmd执行 mysql -u root mysql

mysql>update mysql.user set authentication_string=password('newpassword') where user='root' ;

mysql>Flush privileges;

其中newpassword为root的新密码。

3.将刚才my.ini配置文件的添加那一行去掉,最后重新启动mysql就可以了。

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇select1frombwhereb.id=a.id和sel.. 下一篇Mysql常用的30种SQL查询语句优化..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目