当前位置:网站首页>Modify the root password of MySQL
Modify the root password of MySQL
2022-07-23 11:55:00 【Summer invasion bug planning】
modify mysql Of root password
List of articles
Method 1: use SET PASSWORD command
Log in first MySQL.
Format :mysql> set password for user name @localhost = password(‘ New password ’);
Example :mysql> set password for [email protected] = password(‘123’);
Method 2: use mysqladmin
Format :mysqladmin -u user name -p Old password password New password
Example :mysqladmin -uroot -p123456 password 123
Method 3: use UPDATE Direct editing user surface
Log in first MySQL.
mysql> use mysql;
mysql> update user set password=password(‘123’) where user=‘root’ and host=‘localhost’;
mysql> flush privileges;
Method 4: Forgetting root When it comes to passwords , It can be like this
With windows For example :
- Close running MySQL service .
- open DOS window , go to mysql\bin Catalog .
- Input mysqld --skip-grant-tables enter .–skip-grant-tables It means to start MySQL Skip authority list authentication when serving .
- Open another one DOS window ( Because that one DOS The window can no longer move ), go to mysql\bin Catalog .
- Input mysql enter , If it works , Will appear MySQL Prompt >.
- Connect to permission database : use mysql; .
- Change password :update user set password=password(“123”) where user=“root”;( Don't forget to add a semicolon at the end ) .
- Refresh the permissions ( Steps must be taken ):flush privileges; .
- sign out quit.
- Log off the system , Enter again , Use the user name root And the new password you just set 123 Sign in .
边栏推荐
- MySQL事务
- Compilation principle - detailed explanation of syntax analysis
- [untitled]
- Entrepôt de données 4.0 Notes - acquisition de données sur le comportement de l'utilisateur II
- [doris] configure and basically use the contents system (continue to add content when you have time)
- NFT digital collection system development: Shenzhen Evening News "good times travel" digital collection online seconds chime
- 第一阶段复习
- [untitled]
- One of scala variables and data types
- NFT digital collection platform development and construction, source code development digital collection
猜你喜欢

MySQL存储引擎

NFT digital collection development: what are the possible application scenarios of digital collections in the future?

数仓4.0笔记——用户行为数据采集四

UE4解决WebBrowser无法播放H.264的问题

MySQL storage engine

Using cluster analysis to build a credit card high-risk customer identification model

數倉4.0筆記——用戶行為數據采集四

Development of digital collection system: Baidu AI pays tribute to Air China

Websocket long connection

2. MySQL data management - DML (add, modify, delete data)
随机推荐
Cuda10.0 configuration pytorch1.7.0+monai0.9.0
Data warehouse 4.0 notes - business data collection - sqoop
2. MySQL data management - DML (add, modify, delete data)
Unable to negotiate with port 51732: no matching host key type found. Their offer:
Develop necessary idea use
[untitled]
Scala II process control
[system problems] Net Framework 3.5 installation error
数仓4.0笔记——用户行为数据采集一
链栈
The difference between slice() and slice()
1. Know the database
Stage 1 Review
Gerrit operation manual
Using cluster analysis to build a credit card high-risk customer identification model
数仓4.0笔记——业务数据采集——Sqoop
[uiautomation] key instructions (and three call methods) + common mouse actions +sendkeys+inspect learning
MySQL存储引擎
MySQL modify function permission is not effective
NFT digital collection development: Jingdong "Qida bear takes you to the capital" tourism package