Reset MYSQL root password

Reset Mysql Root Password

mysql1

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’;
FLUSH PRIVILEGES;

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

remove the file , and your password is basem

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s