if i have one website in PHP and database as well now that website database hosted on share server. now i have other system that system hosted in dedicated server. now i want to get data from share server hosted database from my dedicated server i don't want to sift the database but i want to connect that database on my dedicated server is this possible?
This is called "balance loading mysql" Lots of huge sites do this to offload the mysql work to another server and is a very common practice. Very interesting read on how to set it up with a Debian server. I am pretty sure it can be done with linux server too. instead of localhost use the IP of the mysql server and put the port that you have open on the dedicated server for the remote connection. Make sure you setup the permission on the remote server to allow the shared servers IP address to access the MySQL database in the hosting software being used.
It's been explained already how to do this, but as an extra if your database server is cPanel based you can simply login to it and go to the "remote access" section and add your dedicated servers IP. This'll allow it to access the database. As said previously then enlist the database servers IP from your dedicated servers configuration.
OP, most solutions here are the best and easiest ways to go about the solution if cPanel or the likes are available to you which I believe it is seeing its shared hosting. Another way of doing this, a method I implicated some time ago, is just scrape the output from the already existing PHP script on the shared server and just output it on the dedicated server's page. Very simple and a much more dynamic approach if you ask me.