Jump to content

Mysql root passwd: Difference between revisions

From TetraWiki
Subhash (talk | contribs)
Created page with " Category:'''FORGET MYSQL ROOT PASSWORD''' 1.Stop the mysql server. /etc/init.d/mysqld stop 2.Start the mysql daemon with –skip-grant-tables option. -- mysqld_saf..."
 
No edit summary
 
Line 22: Line 22:
4.Reset the mysql root password using the following commands.
4.Reset the mysql root password using the following commands.
--
--
mysql> use mysql;
mysql> use mysql;
mysql> update user set password=PASSWORD("New root pass") where User='root';
mysql> update user set password=PASSWORD("New root pass") where User='root';
mysql> flush privileges;
mysql> flush privileges;
mysql> quit
mysql> quit
--
--
« Dispersed Storage
« Dispersed Storage

Latest revision as of 06:55, 2 January 2016


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)