Reset passwd Mysql on Linux

 

Stop Mysql

service mysqld stop

Restart with

mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --skip-grant-tables

Connexion

mysql -u root mysql

Change passwd

UPDATE user SET password=PASSWORD('newpasswd') WHERE user="root"; exit

Restart

service mysqld restart

Connexion with

mysql -u root -p

Comments

Popular posts from this blog

Install Gitea on NAS Netgear

Send mail with from on Linux