how to reset mysql root password

Mobile
feeds
Welcome Login | Register

how to reset mysql root password
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » MYSQL Forums
        » » how to reset mysql root password
how to reset mysql root password
Post Description: how to reset mysql root password MYSQL
Post Tags:
This Post Has Been Viewed 342 Times Since Tue Jun 24, 2008 11:59 pm Author hostman with 0 replies
how to reset mysql root password
Advertise On This Page




update user set Password=PASSWORD('Gdw3b2n3=2008') WHERE User='root';

ok today for some reason i tried to login to phpmyadmin through the root but i kept getting rejects saying my password was wrong..

i thot i had lost everything. well, if you are in the same situation as i was, where you need to reset your password, you are in luck because i will show you how you can hack it so that you will be able to

NOTE: I TESTED THIS ON FEDORA CORE 7. Should also work on red hat and centos

Stop mysql:
/etc/init.d/mysqld stop


Command:
/usr/bin/mysqld_safe --skip-grant-tables &


Command:
mysql --user=root mysql


YOU WILL SEE:
#############################
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.45 Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.


Command: mysql>
update user set Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root';


NOTE: YOURNEWPASSWORD is whatever password you want the new pasword to be

THEN YOU WILL SEE THIS:

Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0

Command: mysql>
flush privileges;

Query OK, 0 rows affected (0.00 sec)

Command: mysql>
exit

Bye

Command:
/etc/init.d/mysqld start


Command:
mysql --user=root --pass=YOURNEWPASSWORD


DONE
now try to login






###########################################################################
these are just my notes on how i started this tutorial.
im keeping it here just in case i need it
###########################################################################


/etc/init.d/mysqld stop

/usr/bin/mysqld_safe --skip-grant-tables &

mysql --user=root mysql

YOU WILL SEE:
#############################
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.45 Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql>update user set Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root';
##########################



Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

/etc/init.d/mysqld start

mysql --user=root --pass=YOURNEWPASSWORD

now try to login







Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : how to reset mysql root password

Comments and replies About how to reset mysql root password
(0) Comments