PHP sql connect not working

@simhaatsimha, you have shared your database password, which means anyone can log into your database and alter anything he/she wishes. Please change your password and remove it from your post.

I believe you cannot connect to external databases here. You can follow these guides (in order):

EDIT: Are you hosting on InfinityFree? because is another hosting service.