Tutorial RESET PASSWORD OF MYSQL USER

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Blaze

Elite
Elite
VIP
Joined
Jan 28, 2019
Messages
507
Credits
635
It can happen that the data provided in the file base for certain server files is incorrect. Therefore, now I publish instructions on how to reset the password of the MySQL user and replace it with a new one. Although these instructions already exist abundantly on the web, there are always questions about how to do it.



Note: These instructions are general instructions. There is no difference whether you run your server locally or use a vServer or dedicated server. PuTTy can also be used for local instances as an SSH client.



MANUAL


1. Start a PuTTy session and connect to your server.



2. Enter the following commands in the console:

Code:
Expand Collapse Copy
service mysql-server stop
mysqld_safe --skip-grant-tables

3. Now open a second PuTTy session and connect to your server again.



4. Enter the following commands in the console (without the comments):

Code:
Expand Collapse Copy
mysql -u root
use mysql
update user set password = PASSWORD ('NEUESPASSWORT') where user = 'root'; // Replace NEW PASSWORD with your desired password
flush privileges;
quit
service mysql-server start
service mysql-server status


command explanation

 
You can change faster the hashkey in user.myd, replace the key with your new key and restart
 
Back
Top