当前位置:网站首页>mysql登录出现1045错误修改方法[通俗易懂]
mysql登录出现1045错误修改方法[通俗易懂]
2022-06-30 19:51:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
在cmd中输入mysql -uroot -p出现1045错误如下:
ERROR 1045(28000): Access denied for user ‘root’@’localhost'(using password)
解决方法:
1.先找到mysql bin目录下的my.ini文件,在[mysql]下面加上 skip-grant-tables 用于跳过密码
2.重启服务器
net stop mysql
net start mysql
3.进入cmd,重置密码
mysql -uroot -p 回车
不用管password 回车
use mysql; 回车
修改密码:set password for ‘root’@’localhost’=password(‘新密码’);
flush privilegs; 刷新数据库
quit;
4.修改my.ini 注释掉skip-grant-tables;保存退出
5.重启服务器
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/132124.html原文链接:https://javaforall.cn
边栏推荐
- 太湖 “中国健康农产品·手机直播万里行”走进太湖
- How to pass the PMP Exam quickly?
- 微信小程序开发实战 云音乐
- Django上传excel表格并将数据写入数据库的详细步骤
- MySQL master-slave synchronization
- 分析超700万个研发需求发现,这八大编程语言才是行业最需要的
- Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file
- Kubernetes为什么会赢,容器圈的风云变幻!
- 以全栈全功能解决方案,应对多样工具复杂环境DevOps落地难题
- SM2246EN+闪迪15131
猜你喜欢

Data intelligence - dtcc2022! China database technology conference is about to open

Jenkins打包拉取不到最新的jar包

Lambda 表达式原理分析学习(2022.06.23)

Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)

文件包含&条件竞争

Exness: the final value of US GDP unexpectedly accelerated to shrink by 1.6%

“更福特、更中国”拨云见日,长安福特王牌产品订单过万

6-1漏洞利用-FTP漏洞利用

Taiwan SSS Xinchuang sss1700 replaces cmedia cm6533 24bit 96KHz USB audio codec chip
![25: Chapter 3: developing pass service: 8: [registration / login] interface: receiving and verifying](/img/ff/727c4a20ff3816ec7221dced5a4770.png)
25: Chapter 3: developing pass service: 8: [registration / login] interface: receiving and verifying "mobile number and verification code" parameters; (it is important to know the application scenario
随机推荐
25: Chapter 3: developing pass service: 8: [registration / login] interface: receiving and verifying "mobile number and verification code" parameters; (it is important to know the application scenario
6-1漏洞利用-FTP漏洞利用
Unity 如何拖拉多个组件中的一个
文件包含&条件竞争
标配10个安全气囊,奇瑞艾瑞泽8安全防护无死角
Convert seconds to * * hours * * minutes
十分之坑,tar命令解压文件的时候竟然不能解析英文括号“()”
【ICLR 2021】半监督目标检测:Unbiased Teacher For Semi-Supervised Object Detection
qt中toLocal8Bit和toUtf8()有什么区别
QT QStringList用法
Static classes use @resource annotation injection
【450. 删除二叉搜索树中的节点】
RP prototype resource sharing - shopping app
启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
S7-1500 PLC之间进行TCP通信的具体方法和步骤详解(图文)
Kubevela 1.4: make application delivery safer, easier to use, and more transparent
Conditional compilation
Tencent conference application market was officially launched, with more than 20 applications in the first batch
Network planning | [five transport layers and six application layers] knowledge points and examples
Why should offline stores do new retail?