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 you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With