Monday 14 September 2015

Setting MySql root password after installation

Generally if the password for MySql is not set during the installation, then these commands will help you set it externally.

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

Now open MySQL prompt using following command.

$ mysql -u root -p
Enter password:


Enter 'tiger' as password.

No comments:

Post a Comment