No menu link is working after the website is deployed on hosting server I developed a website in the drupal and I have been accessing it in the development environment using the url like this "http://localhost/foldername"... 

Now I have deployed the website (the folder "foldername" and database) to my Linux based hosting server. 

I have to access it for testing using a URL like this "http://HostingServerIpAddress/~HostingServerUserName/foldername". 

To my surprise, no menu link is working over there :( the paths are correct. The menu links which were opening in my local environment, are giving 404 error when opened using hosting urls... :(

Please guide me at your earliest.
When I move a site to the production environment and can only access it using an URL as you describe, I have to disable Drupal's 'Clean URLs' functionality (admin/config/search/clean-urls) in order for menu links to work properly (and probably clear the caches afterwards).

Edit:

In the documentation on configuring clean URLs, I found that changing the RewriteBase setting in the .htaccess file is the solution for me to have clean URLs once again.

So, in your case it probably should be: RewriteBase /~HostingServerUserName/foldername