I need to connect my online mysql database from local wamp/xampp server using php
I need to update some table in my online phpmyadmin database from my local phpmyadmin database , It is possible ? my local machine have internet connection ,
To connect to remote server from your local machine you need some already granted privileges on that server itself with your IP and an username with a prespecified password. So you can't do it without their permission.
Check this answer
After that you are allowed to create connection to that remote database server using the following syntax:
$hostname='www.facebook.com';// Remote database server Domain name.
$username='username';// as specified in the GRANT command at that server.
$password='password';// as specified in the GRANT command at that server.
$dbname='testdb';// Database name at the database server.
$mysqli = new mysqli($hostname, $username, $password, $dbname);
If your database is on a Shared Server Hosting. Some hosting providers does not allow you to connect to your databases remotely.
Here's a quick walkthrough of how to do a remote connection to your database.
Try downloading SQLYog (Community edition).
http://code.google.com/p/sqlyog/downloads/list
It's good for this sort of thing, if you can get to the remote host on standard mysql port 3306. If you're going to connect from php on your local machine, you'll probably go through the same port using one of the php libraries to the remote machine with one connection, and to your local database with with another connection. The tool will let you verify and test the connections and test the queries interactively.
cPanel?my online phpmyadmin database- if you're using phpmyadmin on the server anyway - why not just use phpmyadmin on the server ..? What's the purpose of what you're asking?