Method 1: Use the SET PASSWORD command First log in to MySQL. Format: mysql> set password for username@localhost = password('new password'); Example:mysql> set password for root@localhost = password('123'); Method 2: Using mysqladmin Format: mysqladmin -u username -p old password password new password Example: mysqladmin -uroot -p123456 password 123 Method 3: Use UPDATE to edit the user table directly First log in to MySQL. 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, you can do this Take Windows as an example: 1. Shut down the running MySQL service. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: jQuery realizes the scrolling effect of table row data
>>: Implementation of FIFO in Linux process communication
Table of contents map filter some every findIndex...
Table of contents Effect Start creating text Firs...
Table of contents Target Thought Analysis Code la...
Recently, there is a need to automatically search...
I use tengine, the installation directory is /usr...
Create a new configuration file (for example, go ...
This article shares with you how to import Excel ...
Table of contents 1. TypeScript is introduced int...
Prerequisite: Percona 5.6 version, transaction is...
<br />Looking at this title, you may find it...
How to view files in a docker image 1. If it is a...
Table of contents Zabbix custom monitoring nginx ...
1. Reason I just needed to reinstall MySQL on a n...
Bugs As shown in the figure, I started to copy th...
Index extension: InnoDB automatically extends eac...