Recover Lost Mysql root Password, Change Mysql Root Password, Lost Mysql Root Password

 Recover Lost Mysql root Password, Change Mysql Root Password, Lost Mysql Root Password, Reset Mysql Root Password Linux Cammand Line To Recover the Password following steps are required.

# /etc/init.d/mysqld stop

or

# /etc/init.d/mysql stop

OutPut: Stopping mysqld: [ OK ]

# mysqld_safe --skip-grant-tables &

OutPut:
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

If no # Prompt come type cntrl +c

# mysql -u root

OutPut: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

 mysql> use mysql;

OutPut: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Database changed

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

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

 mysql> flush privileges;

OutPut: Query OK, 0 rows affected (0.00 sec)

mysql> quit

OutPut: Bye

# /etc/init.d/mysql start

Or

# /etc/init.d/mysqld start

Try Logging in now.By typing

Advertisements
By simplemsexchange Posted in SQL 2012

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