Mistakenly I deleted my root user from my mysql.user table.
delete from mysql.user where user=\'username\';
To make same root
If you use DROP USER command to remove the user, then the user gets removed completely. If you have to add user with same username later, you can use FLUSH PRIVILEGES command to completely remove privileges from the mysql memory.
DROP USER username@hostname;
You have to restart mysql or run FLUSH PRIVILEGES before creating the same user because there are issues with privileges.
To restart mysql in linux based systems
sudo service mysql restart
to restart in windows systems
net stop mysql
net start mysql
To flush privilege in mysql prompt
FLUSH PRIVILEGES;
You can alternatively use REVOKE command if you know which privileges that the user has
REVOKE privillege1, privillege2, ... FROM deleted_user@host