Error 1045 when using MySQL or SQLyog

Yesterday i was playing with MySql and SqlYog.I m not much familier with both but as Mysql was needed on one of the project , so i was trying to learn it in a nutshell. Initially there were little setbacks and frustrations but later everything seemed easy.I find things a little different as i m from the Sql Server world.

As i keep on learning i will keep on sharing with you.So the first one is when i installed MySql and configured everything well but when i installed SqlYog and tried to connect them both i got this bad error saying “Error 1045.Access is denied for user abcdefgh@localhost………..” I was clueless of what went wrong after trying for sometime and googling to find nothing i tried some random things and wooola!! one of it did work just simple trick. Actually at every other place i found a solution where there was no password set for the users, so most of the posts told how to change the old password or revoke or grant permissions to the existing users. But i knew that mine was simple as i did everything right. So what happened was that when i installed mysql it asked me for username and password and i politely provided it with one of my favorite username and password. But after trying many times with sqlyog the things were still not looking good. So the simple thing here is while connecting with mysql from sqlyog it expects that you provide username as “root” not the one which you gave while installation and the password remains the same which you gave while installing mysql.   Although a very small tip but almost most newbie's may face this problem. Never loose hope there is always a workaround for everything. Happy Programming !!!!!!!!!!!!!!!!!!