Method 1: Use the SET PASSWORD command mysql> set password for username@localhost = password('new password'); -- Examplemysql> set password for root@localhost = password('123'); Method 2: Using mysqladmin mysql> mysqladmin -u username -p old password password new password; -- Examplemysql> mysqladmin -uroot -p123456 password 123; Method 3: Use UPDATE to edit the user table directly mysql> use mysql; mysql> update user set password=password('123') where user='root' and host='localhost'; mysql> flush privileges; Method 4: When you forget the root password Take Windows as an example:
The above is the details of how to modify the password of the root user in MySQL. For more information about modifying the password of the root user in MySQL, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: How to use gdb to debug core files in Linux
>>: JavaScript to achieve digital clock effects
Build the project Execute the command line in the...
After setting the table width in the page to width...
Table of contents Creating HTML Pages Implement t...
Table of contents 1. Always use key in v-for loop...
To understand what this means, we must first know ...
Table of contents Preface Basic Usage grammar Err...
Using CI to build docker images for release has g...
The code looks like this: SELECT @i:=@i+1 rowNum,...
1. Function Introduction sed (Stream EDitor) is a...
This article shares the specific code of React to...
1. Official website address The official website ...
As the number of visits to the company's webs...
Table of contents cause reason Introduction to NP...
First, let me give you an example (if you don’t w...
Preface: Vue3 has been released for a long time. ...