当前位置:网站首页>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
边栏推荐
- dataloader 源码_DataLoader
- Lombok
- Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file
- 线下门店为什么要做新零售?
- Application of JDBC in performance test
- 基于slate构建文档编辑器
- 将秒数转换为**小时**分钟
- 4.3-inch touch screen 12 channel control port programmable network central control supports mutual backup of 5 central control hosts
- Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
- Detailed explanation of specific methods and steps for TCP communication between s7-1500 PLCs (picture and text)
猜你喜欢

QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory
Django上传excel表格并将数据写入数据库的详细步骤

Tencent conference application market was officially launched, with more than 20 applications in the first batch
MySQL数据库误删回滚的解决

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

Primary school, session 3 - afternoon: Web_ sessionlfi

Tensorflow2.4 implementation of repvgg

Conditional compilation

【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baseline
Solution to rollback of MySQL database by mistake deletion
随机推荐
Tensorflow2.4实现RepVGG
Basic syntax of VB
Qt:qaxobject operation Excel
composer
Exness: the final value of US GDP unexpectedly accelerated to shrink by 1.6%
exness:美GDP终值意外加速萎缩1.6%
Halcon知识:盘点一下计量对象【1】
“更福特、更中国”拨云见日,长安福特王牌产品订单过万
项目经理面试常见问题及回答技巧
arthas调试 确定问题工具包
DELL R720服务器安装网卡Broadcom 5720驱动
MySQL数据库误删回滚的解决
Torchdrug -- drug attribute prediction
CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
Primary school, session 3 - afternoon: Web_ sessionlfi
Primary school, session 3 - afternoon: Web_ xxe
MySQL数据库查询优化
TorchDrug--药物属性预测
Taihu Lake "China's healthy agricultural products · mobile phone live broadcast" enters Taihu Lake
Static classes use @resource annotation injection