Reset MYSQL root password

Reset Mysql Root Password


Congratulations…, You are not the only one who have bad memory on this planet …

This is for LINUX users only …

stop the service :

shell>/etc/init.d/mysql stop

create file on tmp with contain the below:

UPDATE mysql.user SET Password=PASSWORD(‘basem’) WHERE User=’root’;

Now start the service with the file
shell> mysqld_safe –init-file=/tmp/thefile

remove the file , and your password is basem