Hi,
Thanks for all your suggestions.
yes i have downloaded CLI and also installed.The problem is that inside php it creates another php.ini,which is used when i run php samples from commend prompt.And in that php.ini mysql support was not there.Also when i locate php.ini in terminal it is not showing that php.ini resides in that cli folder.Any way i find it and set mysql support for php on and it works.Its great that i found this myself.And i m very happy.
Still thanks for all your help.I m happy that so many people replied to my question.