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. Summarize The above are the various methods that I introduced to you about how to modify the MySQL database password using Navicat. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time! You may also be interested in:
|
<<: React Native environment installation process
>>: How to configure common software on Linux
Section Course content Hours 1 Web Design Overvie...
Will mysql's IN invalidate the index? Won'...
Table of contents 1. Introduction to ReactJS 2. U...
touch Command It has two functions: one is to upd...
Table of contents 1. What content usually needs t...
Table of contents Avoid using the spread operator...
Today, I encountered a little problem when I was ...
1. Command Introduction The ifconfig (configure a...
Start the centos8 virtual machine and press the u...
01. Compile options and kernel compilation The Li...
This seems to be no longer possible with the new ...
Web front-end optimization best practices: conten...
Table of contents 1. MySQL Architecture 2. Networ...
Today, my colleague encountered a very strange pr...
1. Principle of Hotlinking 1.1 Web page preparati...