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
1. Basic Concepts //Any container can be specifie...
This article example shares the specific code of ...
<br />It has been no more than two years sin...
1. HTML tags with attributes XML/HTML CodeCopy co...
In the previous article, I introduced the detaile...
Tutorial Series MySQL series: Basic concepts of M...
0. Introduction August 18, 2016 Today, I noticed ...
When configuring nginx reverse proxy, the slashes...
1. Basic Introduction of Linux Group In Linux, ev...
Today I used a virtual machine to do an experimen...
Among classic color combinations, probably no one...
1. Nginx installation steps 1.1 Official website ...
Table of contents 1. Baidu Map API Access 2. Usin...
This article introduces blue-green deployment and...
Table of contents Preface InnoDB storage architec...