First way: skip-grant-tables: Very useful mysql startup parameters Introducing a very useful MySQL startup parameter --skip-grant-tables. As the name implies, it is starting Start mysql with command line parameters: # /usr/bin/mysqld_safe --skip-grant-tables & 3. Change the administrator password: use mysql; update user set password=password('yournewpasswordhere') where user='root'; flush privileges; exit; 4. Kill mysql and restart mysql. Then you can log in directly Method 2: View the path where MySQL is installed Then we change the root user's password, Check the default password first Then log in directly Then change the default root username and password GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' identified by 'password'; flush privileges; mysql>update mysql.user set password=password('new password') where User="test" and Host="localhost"; mysql>flush privileges; mysql>delete from user where User='root' and Host='localhost'; mysql>flush privileges; mysql>grant select,delete,update,create,drop on *.* to test@"%" identified by "1234"; mysql> UPDATE user SET Host='127.0.0.1' WHERE User='root' AND Host='localhost'; Change Grant_priv to 'Y' (flush privileges; (execute this statement or restart MySQL to take effect)), update mysql.user set Grant_priv='Y' where user='ptmind'; You may also be interested in:
|
<<: HTML+CSS+JS realizes canvas follows the mouse small circle special effect source code
This article shares the specific code of JS+AJAX ...
Preface 1. Benchmarking is a type of performance ...
Preface Recently, I have been busy writing a smal...
Copy the certificate and key on the web scp -rp -...
1. Import csv file Use the following command: 1.m...
HTML is a hybrid language used for publishing on ...
How to view version information under Linux, incl...
Table of contents Preface 1. Style penetration 1....
challenge: Converts the characters &, <, &...
As a super rookie, I just started learning MySQL ...
Table of contents Preface Install Introduction Sw...
ScreenCloud is a great little app you didn’t even...
question Because some of our pages request data i...
This article shares a sharing sidebar implemented...
question Adding the type of uploaded file in acce...