Reset root password in MySQL
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Reset root password in MySQL
Today my friend Jobaer asked me to help him reset his password in mysql. He apparently forgot what his password was. And he tried in many ways to reset/change it. None worked. So I decided to give a look.
After a while, I found exactly how to reset mysql password The steps are:
Stop MySQL server.
Start MySQL Daemon with grant table skipping.
Login to MySQL server using username root
Now, flush privileges
And then, restart mysql server.
Test your mysql Password:
when asked, enter your new password
After a while, I found exactly how to reset mysql password The steps are:
Stop MySQL server.
- Code:
sudo /etc/init.d/mysql stop
Start MySQL Daemon with grant table skipping.
- Code:
sudo mysqld_safe --skip-grant-tables &
Login to MySQL server using username root
- Code:
mysql -u root
- Code:
use mysql;
- Code:
update user set password=PASSWORD("NEW-PASSWORD") where User='root';
Now, flush privileges
- Code:
flush privileges;
And then, restart mysql server.
- Code:
/etc/init.d/mysql stop
/etc/init.d/mysql start
Test your mysql Password:
- Code:
mysql -u root -p
when asked, enter your new password
Similar topics
» How to reset wireless cisco router password ?
» some commands for mysql.....
» Command for MySQL of DBMS-I
» Various commands for DBMS and MySQL
» MYSQL commands Collection
» some commands for mysql.....
» Command for MySQL of DBMS-I
» Various commands for DBMS and MySQL
» MYSQL commands Collection
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford