Jump to content

Mysql root passwd: Difference between revisions

From TetraWiki
No edit summary
Flag as outdated (client review pass)
 
Line 1: Line 1:
{{Outdated|reason=Old Article / Architecture / Technology  might not be relevant now May Use for Understand concepts|date=2026-07}}


[[Category:'''FORGET MYSQL ROOT PASSWORD''' ]]  
[[Category:'''FORGET MYSQL ROOT PASSWORD''' ]]  

Latest revision as of 16:00, 25 July 2026

This is an Old / Outdated Article, Please use this only as technical Reference
Reason: Old Article / Architecture / Technology might not be relevant now May Use for Understand concepts
Flagged: 2026-07

1.Stop the mysql server.

/etc/init.d/mysqld stop

2.Start the mysql daemon with –skip-grant-tables option. --

mysqld_safe --skip-grant-tables&

3.Login to the server as root user.

[root@alpha ~]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g. our MySQL connection id is 1 Server version: 5.0.77 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> 4.Reset the mysql root password using the following commands. --

mysql> use mysql;
mysql> update user set password=PASSWORD("New root pass") where User='root';
mysql> flush privileges;
mysql> quit

-- « Dispersed Storage Adding multiple virtual network interfaces in Ubuntu » Reset mysql root password

Sometimes in some situations we forget some important things in their life LOL.So today I’m gonna share how to reset the reset the mysql root password.The steps are here.

1.Stop the mysql server.

/etc/init.d/mysqld stop

2.Start the mysql daemon with –skip-grant-tables option.

mysqld_safe --skip-grant-tables&

3.Login to the server as root user.

[root@alpha ~]# mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.

our MySQL connection id is 1

Server version: 5.0.77 Source distribution


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


mysql>

4.Reset the mysql root password using the following commands.

mysql> use mysql;

mysql> update user set password=PASSWORD("New root pass") where User='root';

mysql> flush privileges;

mysql> quit

5.Stop the mysql daemon and start it again. /etc/init.d/mysqld stop

/etc/init.d/mysqld start

--Subhash 12:52, 29 September 2012 (IST)