Resetting the Mysql Root account password in Linux.

If you are re-installing only Wireless Manager (WM) by not removing License Manager and Mysql from the existing installation, are not sure about the Root account password and the error below is received, you can follow the below mentioned procedure to reset the password.

Go to Terminal and stop the service with below command

(Ubuntu and Debian) Run the following command:   sudo /etc/init.d/mysql stop

(CentOS and Red Hat Enterprise Linux) Run the following command:  sudo /etc/init.d/mysqld stop

Start MySQL without a password

sudo mysqld_safe --skip-grant-tables &

Login to the Mysql

mysql –uroot

use mysql;

update user set password=PASSWORD("public") where User='root';

flush privileges;

quit

This will create the password as public for root account

Stop and start the MySQL service

(Ubuntu and Debian) Run the following commands:

sudo /etc/init.d/mysql stop

sudo /etc/init.d/mysql start

(CentOS, Fedora, and Red Hat Enterprise Linux) Run the following commands:

sudo /etc/init.d/mysqld stop

sudo /etc/init.d/mysqld start

Log in to the database to cross check if the password public is working

mysql -u root –p

(Enter the password public and you should be able to login to the mysql)

Now on the WM installation GUI you can try the password and that should work.

Regards,

Sanjay Kumar.