How to connect mysql online database server from local wamp server using php?

I need to connect my mysql online database from local wamp / xampp server using php

I need to update some table in my phpmyadmin online database from my local phpmyadmin database, maybe? my local machine has an internet connection,

+4
source share
3 answers

To connect to a remote server from your local computer, you will need the one already provided privilegeson this server with your IP and username with a predefined password . Therefore, you cannot do this without their permission.

Mark this answer

After that, you can create a connection to this 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);
+2
source

If your database is on a shared server host. Some hosting providers do not allow you to remotely connect to your databases.

Here's a quick guide walkthroughon how to make a remote connection to your database.

+1
source

SQLYog ( ).

http://code.google.com/p/sqlyog/downloads/list

This is good for this kind of thing if you can reach the remote host on the standard mysql port 3306. If you are going to connect with php on your local machine, you will probably go through the same port using one php library on a remote computer with one connection and with your local database with a different connection. The tool allows you to test and test connections and test queries interactively.

0
source

All Articles