当前位置:网站首页>【踩坑系列】mysql 修改root密码失败
【踩坑系列】mysql 修改root密码失败
2022-07-03 07:36:00 【涛涛之海】
【踩坑系列】 mysql 修改root密码失败
问题原因
mysql 修改root密码失败 ,主要是因为root的host不是localhost,是%的问题。
修改密码的步骤

-- 切换到 mysql bin 路径
--先登录mysql
mysql -u root -p
--输入密码
-- 切换到mysql数据
use mysql;
-- 查询用户信息
select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| admin | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| zhangj | localhost |
+------------------+-----------+
注意我的root,host是’%’
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123';
边栏推荐
- 【LeetCode】4. Best Time to Buy and Sell Stock·股票买卖最佳时机
- Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing
- Beginners use Minio
- Go language foundation ----- 13 ----- file
- 【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)
- Go language foundation ----- 04 ----- closure, array slice, map, package
- How long is the fastest time you can develop data API? One minute is enough for me
- Some experiences of Arduino soft serial port communication
- The difference between typescript let and VaR
- Read config configuration file of vertx
猜你喜欢

Leetcode 198: house raiding

Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition

Reconnaissance et détection d'images - Notes

Topic | synchronous asynchronous

技术干货|昇思MindSpore算子并行+异构并行,使能32卡训练2420亿参数模型

技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务

Go language foundation ----- 11 ----- regular expression

Analysis of the problems of the 10th Blue Bridge Cup single chip microcomputer provincial competition

Custom generic structure

最全SQL与NoSQL优缺点对比
随机推荐
技术干货|昇思MindSpore初级课程上线:从基本概念到实操,1小时上手!
PAT甲级 1028 List Sorting
[set theory] order relation (partial order relation | partial order set | example of partial order set)
截图工具Snipaste
Qtip2 solves the problem of too many texts
pgAdmin 4 v6.11 发布,PostgreSQL 开源图形化管理工具
PAT甲级 1032 Sharing
TreeMap
IndexSort
Circuit, packet and message exchange
【MySQL 12】MySQL 8.0.18 重新初始化
【MindSpore论文精讲】AAAI长尾问题中训练技巧的总结
项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
Spa single page application
技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务
Leetcode 213: 打家劫舍 II
【LeetCode】2. Valid Parentheses·有效的括号
Introduction of buffer flow
技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务