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
1. Time formatting and other methods It is recomm...
Preface This article uses pdo's preprocessing...
1. Introduction This article describes how to use...
1. Create a new user wwweee000 [root@localhost ~]...
1. Command Introduction The read command is a bui...
1. Environmental Preparation 1.1 Basic Environmen...
1. Remove backslashes through the "stripslas...
Six steps to install MySQL (only the installation...
I came into contact with CSS a long time ago, but...
By default, the border of the table is 0, and we ...
Table of contents 1. Initialize the map 2. Map Po...
Preface The language classification of SQL mainly...
Copy code The code is as follows: <style type=...
This article example shares the specific code of ...
Use the vscode editor to create a vue template, s...