当前位置:网站首页>【踩坑系列】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';
边栏推荐
- Take you through the whole process and comprehensively understand the software accidents that belong to testing
- Go language foundation ----- 08 ----- interface
- 专题 | 同步 异步
- 图像识别与检测--笔记
- PAT甲级 1028 List Sorting
- Use of file class
- Go language foundation ----- 06 ----- anonymous fields, fields with the same name
- UA camouflage, get and post in requests carry parameters to obtain JSON format content
- 【LeetCode】4. Best Time to Buy and Sell Stock·股票买卖最佳时机
- Various postures of CS without online line
猜你喜欢
The embodiment of generics in inheritance and wildcards
Comparison of advantages and disadvantages between most complete SQL and NoSQL
Go language foundation ----- 08 ----- interface
【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题
不出网上线CS的各种姿势
Application of pigeon nest principle in Lucene minshouldmatchsumscorer
Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS
Go language foundation ----- 02 ----- basic data types and operators
Common methods of file class
Go language foundation ----- 13 ----- file
随机推荐
Leetcode 198: house raiding
Lucene merge document order
Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience
【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表
Unified handling and interception of exception exceptions of vertx
技术干货|昇思MindSpore初级课程上线:从基本概念到实操,1小时上手!
Read config configuration file of vertx
The concept of C language pointer
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
技术干货|百行代码写BERT,昇思MindSpore能力大赏
Hnsw introduction and some reference articles in lucene9
Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS
技术干货|关于AI Architecture未来的一些思考
输入三次猜一个数字
Usage of requests module
Vertx multi vertical shared data
Technical dry goods Shengsi mindspire operator parallel + heterogeneous parallel, enabling 32 card training 242 billion parameter model
项目经验分享:基于昇思MindSpore实现手写汉字识别
截图工具Snipaste
Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing