Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday 14 August 2016

How To Reset MySQL Root Password in CentOS/RHEL & Ubuntu

How To Reset MySQL Root Password in  CentOS/RHEL & Ubuntu


For CentOS/RHEL User :

Step: 1. Stop MySQL Service :

# service mysqld stop

Step: 2. Start to MySQL Server without Password :

# mysqld_safe --skip-grant-tables &

Step: 3. Connect to MySQL Server using MySQL Client :

# mysql -u root

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

Step: 4. Stop the MySQL Server Again :

# service mysqld stop

Step: 5. Start MySQL Server Normally & Test it :

# service mysqld restart
# chkconfig mysqld on

# mysql -u root -p
Enter Password:

For Debian/Ubuntu User :

$ sudo dpkg-reconfigure mysql-server-5.5
--  Give New Password.


Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

0 comments:

Post a Comment

Copyright © 2016 Kousik Chatterjee's Blog