How to change MySQL Password/phpmyadmin Linux

* Blaze *

New member
Messages
110
Points
0
Emulator
If this is the first time you have logged into your server through this manner, you will be prompted to accept the identification of this server. Once you do this and are logged in, perform the following commands to reset the administrator password. 

Step.1

[SIZE=small]#service mysqld stop[/SIZE]

phyton_zpsc0beafaa.png


[SIZE=small]Step.2[/SIZE]
[SIZE=small]#/usr/bin/mysqld_safe --skip-grant-tables &[/SIZE]
phyton_zpsb6925c23.png


This starts the MySQL daemon in the background and skips the authentication mechanisms.

[SIZE=small]Step.3[/SIZE]
#mysq
[SIZE=small]
phyton_zps83864ece.png
[/SIZE]
 
[SIZE=small]Step.4[/SIZE]

#use mysql;

phyton_zps863c4b08.png


Step.5

#update user set password=password('newpassword') where user='root' and host='localhost';

phyton_zps67d3af49.png


 

 

Step.6
[SIZE=small]#flush privileges;[/SIZE]
phyton_zps95f0cf87.png


[SIZE=small]Step.7[/SIZE]

#quit

phyton_zpsa0aaf6fc.png


Step.8

#service mysqld stop

[SIZE=small]
phyton_zpsbb4647e9.png
[/SIZE]

Step.9

#service mysqld start

phyton_zpsec74b446.png


Step.10

#exit

Untitled_zpsf2c76b6f.png


 

Dev Blaze ™ 
 
Last edited by a moderator:
Back
Top